@ibiz-template-plugin/ai-chat 0.0.78 → 0.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -47,19 +47,19 @@ var Ic = function(n, e) {
|
|
|
47
47
|
return function() {
|
|
48
48
|
return hs.apply(n, arguments);
|
|
49
49
|
};
|
|
50
|
-
},
|
|
50
|
+
}, Rc = Ke, bf = Rc({}.toString), wf = Rc("".slice), Pc = function(n) {
|
|
51
51
|
return wf(bf(n), 8, -1);
|
|
52
|
-
}, Cf = Ke, kf = Ct, xf =
|
|
52
|
+
}, Cf = Ke, kf = Ct, xf = Pc, kr = Object, Sf = Cf("".split), zc = kf(function() {
|
|
53
53
|
return !kr("z").propertyIsEnumerable(0);
|
|
54
54
|
}) ? function(n) {
|
|
55
55
|
return xf(n) === "String" ? Sf(n, "") : kr(n);
|
|
56
|
-
} : kr,
|
|
56
|
+
} : kr, Lc = function(n) {
|
|
57
57
|
return n == null;
|
|
58
|
-
}, Tf =
|
|
58
|
+
}, Tf = Lc, Mf = TypeError, Bc = function(n) {
|
|
59
59
|
if (Tf(n))
|
|
60
60
|
throw new Mf("Can't call method on " + n);
|
|
61
61
|
return n;
|
|
62
|
-
}, _f =
|
|
62
|
+
}, _f = zc, Nf = Bc, Qi = function(n) {
|
|
63
63
|
return _f(Nf(n));
|
|
64
64
|
}, xr = typeof document == "object" && document.all, Qe = typeof xr > "u" && xr !== void 0 ? function(n) {
|
|
65
65
|
return typeof n == "function" || n === xr;
|
|
@@ -71,10 +71,10 @@ var Ic = function(n, e) {
|
|
|
71
71
|
return Of(n) ? n : void 0;
|
|
72
72
|
}, to = function(n, e) {
|
|
73
73
|
return arguments.length < 2 ? Af(Sr[n]) : Sr[n] && Sr[n][e];
|
|
74
|
-
}, If = Ke, Df = If({}.isPrototypeOf), $f = Be, Yo = $f.navigator, Zo = Yo && Yo.userAgent,
|
|
74
|
+
}, If = Ke, Df = If({}.isPrototypeOf), $f = Be, Yo = $f.navigator, Zo = Yo && Yo.userAgent, Rf = Zo ? String(Zo) : "", Fc = Be, Tr = Rf, Qo = Fc.process, ea = Fc.Deno, ta = Qo && Qo.versions || ea && ea.version, na = ta && ta.v8, Ve, Ii;
|
|
75
75
|
na && (Ve = na.split("."), Ii = Ve[0] > 0 && Ve[0] < 4 ? 1 : +(Ve[0] + Ve[1]));
|
|
76
76
|
!Ii && Tr && (Ve = Tr.match(/Edge\/(\d+)/), (!Ve || Ve[1] >= 74) && (Ve = Tr.match(/Chrome\/(\d+)/), Ve && (Ii = +Ve[1])));
|
|
77
|
-
var
|
|
77
|
+
var Pf = Ii, ia = Pf, zf = Ct, Lf = Be, Bf = Lf.String, Vc = !!Object.getOwnPropertySymbols && !zf(function() {
|
|
78
78
|
var n = Symbol("symbol detection");
|
|
79
79
|
return !Bf(n) || !(Object(n) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
80
80
|
!Symbol.sham && ia && ia < 41;
|
|
@@ -93,7 +93,7 @@ var Rf = Ii, ia = Rf, Lf = Ct, zf = Be, Bf = zf.String, Vc = !!Object.getOwnProp
|
|
|
93
93
|
if (Jf(n))
|
|
94
94
|
return n;
|
|
95
95
|
throw new Xf(Gf(n) + " is not a function");
|
|
96
|
-
}, Yf = Wc, Zf =
|
|
96
|
+
}, Yf = Wc, Zf = Lc, Qf = function(n, e) {
|
|
97
97
|
var t = n[e];
|
|
98
98
|
return Zf(t) ? void 0 : Yf(t);
|
|
99
99
|
}, Mr = eo, _r = Qe, Nr = Jn, ep = TypeError, tp = function(n, e) {
|
|
@@ -147,15 +147,15 @@ var io = Uc.exports, aa = io, qc = function(n, e) {
|
|
|
147
147
|
return 7;
|
|
148
148
|
}
|
|
149
149
|
}).a !== 7;
|
|
150
|
-
}), $p = kt,
|
|
150
|
+
}), $p = kt, Rp = eo, Pp = Ec, zp = Ic, Lp = Qi, Bp = Xc, Fp = Ut, Vp = Zc, ha = Object.getOwnPropertyDescriptor;
|
|
151
151
|
Zs.f = $p ? ha : function(e, t) {
|
|
152
|
-
if (e =
|
|
152
|
+
if (e = Lp(e), t = Bp(t), Vp)
|
|
153
153
|
try {
|
|
154
154
|
return ha(e, t);
|
|
155
155
|
} catch (i) {
|
|
156
156
|
}
|
|
157
157
|
if (Fp(e, t))
|
|
158
|
-
return
|
|
158
|
+
return zp(!Rp(Pp.f, e, t), e[t]);
|
|
159
159
|
};
|
|
160
160
|
var bn = {}, Hp = kt, jp = Ct, Qc = Hp && jp(function() {
|
|
161
161
|
return Object.defineProperty(function() {
|
|
@@ -203,23 +203,23 @@ am(ms.inspectSource) || (ms.inspectSource = function(n) {
|
|
|
203
203
|
});
|
|
204
204
|
var cm = ms.inspectSource, um = Be, dm = Qe, pa = um.WeakMap, hm = dm(pa) && /native code/.test(String(pa)), fm = qc, pm = Jc, ma = fm("keys"), iu = function(n) {
|
|
205
205
|
return ma[n] || (ma[n] = pm(n));
|
|
206
|
-
}, so = {}, mm = hm, ru = Be, gm = Jn, vm = eu, $r = Ut,
|
|
207
|
-
return $i(n) ?
|
|
206
|
+
}, so = {}, mm = hm, ru = Be, gm = Jn, vm = eu, $r = Ut, Rr = io, ym = iu, bm = so, ga = "Object already initialized", gs = ru.TypeError, wm = ru.WeakMap, Di, Pn, $i, Cm = function(n) {
|
|
207
|
+
return $i(n) ? Pn(n) : Di(n, {});
|
|
208
208
|
}, km = function(n) {
|
|
209
209
|
return function(e) {
|
|
210
210
|
var t;
|
|
211
|
-
if (!gm(e) || (t =
|
|
211
|
+
if (!gm(e) || (t = Pn(e)).type !== n)
|
|
212
212
|
throw new gs("Incompatible receiver, " + n + " required");
|
|
213
213
|
return t;
|
|
214
214
|
};
|
|
215
215
|
};
|
|
216
|
-
if (mm ||
|
|
217
|
-
var Je =
|
|
216
|
+
if (mm || Rr.state) {
|
|
217
|
+
var Je = Rr.state || (Rr.state = new wm());
|
|
218
218
|
Je.get = Je.get, Je.has = Je.has, Je.set = Je.set, Di = function(n, e) {
|
|
219
219
|
if (Je.has(n))
|
|
220
220
|
throw new gs(ga);
|
|
221
221
|
return e.facade = n, Je.set(n, e), e;
|
|
222
|
-
},
|
|
222
|
+
}, Pn = function(n) {
|
|
223
223
|
return Je.get(n) || {};
|
|
224
224
|
}, $i = function(n) {
|
|
225
225
|
return Je.has(n);
|
|
@@ -230,7 +230,7 @@ if (mm || Pr.state) {
|
|
|
230
230
|
if ($r(n, Gt))
|
|
231
231
|
throw new gs(ga);
|
|
232
232
|
return e.facade = n, vm(n, Gt, e), e;
|
|
233
|
-
},
|
|
233
|
+
}, Pn = function(n) {
|
|
234
234
|
return $r(n, Gt) ? n[Gt] : {};
|
|
235
235
|
}, $i = function(n) {
|
|
236
236
|
return $r(n, Gt);
|
|
@@ -238,14 +238,14 @@ if (mm || Pr.state) {
|
|
|
238
238
|
}
|
|
239
239
|
var xm = {
|
|
240
240
|
set: Di,
|
|
241
|
-
get:
|
|
241
|
+
get: Pn,
|
|
242
242
|
has: $i,
|
|
243
243
|
enforce: Cm,
|
|
244
244
|
getterFor: km
|
|
245
245
|
}, oo = Ke, Sm = Ct, Tm = Qe, si = Ut, vs = kt, Mm = sm.CONFIGURABLE, _m = cm, su = xm, Nm = su.enforce, Em = su.get, va = String, Si = Object.defineProperty, Om = oo("".slice), Am = oo("".replace), Im = oo([].join), Dm = vs && !Sm(function() {
|
|
246
246
|
return Si(function() {
|
|
247
247
|
}, "length", { value: 8 }).length !== 8;
|
|
248
|
-
}), $m = String(String).split("String"),
|
|
248
|
+
}), $m = String(String).split("String"), Rm = tu.exports = function(n, e, t) {
|
|
249
249
|
Om(va(e), 0, 7) === "Symbol(" && (e = "[" + Am(va(e), /^Symbol\(([^)]*)\).*$/, "$1") + "]"), t && t.getter && (e = "get " + e), t && t.setter && (e = "set " + e), (!si(n, "name") || Mm && n.name !== e) && (vs ? Si(n, "name", { value: e, configurable: !0 }) : n.name = e), Dm && t && si(t, "arity") && n.length !== t.arity && Si(n, "length", { value: t.arity });
|
|
250
250
|
try {
|
|
251
251
|
t && si(t, "constructor") && t.constructor ? vs && Si(n, "prototype", { writable: !1 }) : n.prototype && (n.prototype = void 0);
|
|
@@ -254,20 +254,20 @@ var xm = {
|
|
|
254
254
|
var i = Nm(n);
|
|
255
255
|
return si(i, "source") || (i.source = Im($m, typeof e == "string" ? e : "")), n;
|
|
256
256
|
};
|
|
257
|
-
Function.prototype.toString =
|
|
257
|
+
Function.prototype.toString = Rm(function() {
|
|
258
258
|
return Tm(this) && Em(this).source || _m(this);
|
|
259
259
|
}, "toString");
|
|
260
|
-
var
|
|
260
|
+
var Pm = tu.exports, zm = Qe, Lm = bn, Bm = Pm, Fm = no, Vm = function(n, e, t, i) {
|
|
261
261
|
i || (i = {});
|
|
262
262
|
var r = i.enumerable, s = i.name !== void 0 ? i.name : e;
|
|
263
|
-
if (
|
|
263
|
+
if (zm(t) && Bm(t, s, i), i.global)
|
|
264
264
|
r ? n[e] = t : Fm(e, t);
|
|
265
265
|
else {
|
|
266
266
|
try {
|
|
267
267
|
i.unsafe ? n[e] && (r = !0) : delete n[e];
|
|
268
268
|
} catch (o) {
|
|
269
269
|
}
|
|
270
|
-
r ? n[e] = t :
|
|
270
|
+
r ? n[e] = t : Lm.f(n, e, {
|
|
271
271
|
value: t,
|
|
272
272
|
enumerable: !1,
|
|
273
273
|
configurable: !i.nonConfigurable,
|
|
@@ -312,12 +312,12 @@ var Rm = tu.exports, Lm = Qe, zm = bn, Bm = Rm, Fm = no, Vm = function(n, e, t,
|
|
|
312
312
|
// `Array.prototype.indexOf` method
|
|
313
313
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
314
314
|
indexOf: ya(!1)
|
|
315
|
-
}, r1 = Ke,
|
|
315
|
+
}, r1 = Ke, Pr = Ut, s1 = Qi, o1 = i1.indexOf, a1 = so, ba = r1([].push), cu = function(n, e) {
|
|
316
316
|
var t = s1(n), i = 0, r = [], s;
|
|
317
317
|
for (s in t)
|
|
318
|
-
!
|
|
318
|
+
!Pr(a1, s) && Pr(t, s) && ba(r, s);
|
|
319
319
|
for (; e.length > i; )
|
|
320
|
-
|
|
320
|
+
Pr(t, s = e[i++]) && (~o1(r, s) || ba(r, s));
|
|
321
321
|
return r;
|
|
322
322
|
}, ao = [
|
|
323
323
|
"constructor",
|
|
@@ -346,25 +346,25 @@ var d1 = to, h1 = Ke, f1 = ou, p1 = uu, m1 = er, g1 = h1([].concat), v1 = d1("Re
|
|
|
346
346
|
return t === N1 ? !0 : t === _1 ? !1 : x1(e) ? k1(e) : !!e;
|
|
347
347
|
}, T1 = Gn.normalize = function(n) {
|
|
348
348
|
return String(n).replace(S1, ".").toLowerCase();
|
|
349
|
-
}, M1 = Gn.data = {}, _1 = Gn.NATIVE = "N", N1 = Gn.POLYFILL = "P", E1 = Gn, oi = Be, O1 = Zs.f, A1 = eu, I1 = Vm, D1 = no, $1 = C1,
|
|
349
|
+
}, M1 = Gn.data = {}, _1 = Gn.NATIVE = "N", N1 = Gn.POLYFILL = "P", E1 = Gn, oi = Be, O1 = Zs.f, A1 = eu, I1 = Vm, D1 = no, $1 = C1, R1 = E1, P1 = function(n, e) {
|
|
350
350
|
var t = n.target, i = n.global, r = n.stat, s, o, a, l, c, u;
|
|
351
351
|
if (i ? o = oi : r ? o = oi[t] || D1(t, {}) : o = oi[t] && oi[t].prototype, o)
|
|
352
352
|
for (a in e) {
|
|
353
|
-
if (c = e[a], n.dontCallGetSet ? (u = O1(o, a), l = u && u.value) : l = o[a], s =
|
|
353
|
+
if (c = e[a], n.dontCallGetSet ? (u = O1(o, a), l = u && u.value) : l = o[a], s = R1(i ? a : t + (r ? "." : "#") + a, n.forced), !s && l !== void 0) {
|
|
354
354
|
if (typeof c == typeof l)
|
|
355
355
|
continue;
|
|
356
356
|
$1(c, l);
|
|
357
357
|
}
|
|
358
358
|
(n.sham || l && l.sham) && A1(c, "sham", !0), I1(o, a, c, n);
|
|
359
359
|
}
|
|
360
|
-
},
|
|
361
|
-
if (
|
|
362
|
-
return
|
|
360
|
+
}, z1 = Pc, L1 = Ke, B1 = function(n) {
|
|
361
|
+
if (z1(n) === "Function")
|
|
362
|
+
return L1(n);
|
|
363
363
|
}, Ca = B1, F1 = Wc, V1 = Qs, H1 = Ca(Ca.bind), j1 = function(n, e) {
|
|
364
364
|
return F1(n), e === void 0 ? n : V1 ? H1(n, e) : function() {
|
|
365
365
|
return n.apply(e, arguments);
|
|
366
366
|
};
|
|
367
|
-
}, W1 = j1, U1 =
|
|
367
|
+
}, W1 = j1, U1 = zc, q1 = Kc, K1 = lu, ka = function(n) {
|
|
368
368
|
var e = n === 1;
|
|
369
369
|
return function(t, i, r) {
|
|
370
370
|
for (var s = q1(t), o = U1(s), a = K1(o), l = W1(i, r), c, u; a-- > 0; )
|
|
@@ -393,7 +393,7 @@ du.f = Z1 && !Q1 ? Object.defineProperties : function(e, t) {
|
|
|
393
393
|
e0.f(e, a = r[o++], i[a]);
|
|
394
394
|
return e;
|
|
395
395
|
};
|
|
396
|
-
var r0 = to, s0 = r0("document", "documentElement"), o0 = er, a0 = du, xa = ao, l0 = so, c0 = s0, u0 = Yc, d0 = iu, Sa = ">", Ta = "<", ys = "prototype", bs = "script", hu = d0("IE_PROTO"),
|
|
396
|
+
var r0 = to, s0 = r0("document", "documentElement"), o0 = er, a0 = du, xa = ao, l0 = so, c0 = s0, u0 = Yc, d0 = iu, Sa = ">", Ta = "<", ys = "prototype", bs = "script", hu = d0("IE_PROTO"), zr = function() {
|
|
397
397
|
}, fu = function(n) {
|
|
398
398
|
return Ta + bs + Sa + n + Ta + "/" + bs + Sa;
|
|
399
399
|
}, Ma = function(n) {
|
|
@@ -416,7 +416,7 @@ var r0 = to, s0 = r0("document", "documentElement"), o0 = er, a0 = du, xa = ao,
|
|
|
416
416
|
l0[hu] = !0;
|
|
417
417
|
var f0 = Object.create || function(e, t) {
|
|
418
418
|
var i;
|
|
419
|
-
return e !== null ? (
|
|
419
|
+
return e !== null ? (zr[ys] = o0(e), i = new zr(), zr[ys] = null, i[hu] = e) : i = Ti(), t === void 0 ? i : a0.f(i, t);
|
|
420
420
|
}, p0 = Gc, m0 = f0, g0 = bn.f, ws = p0("unscopables"), Cs = Array.prototype;
|
|
421
421
|
Cs[ws] === void 0 && g0(Cs, ws, {
|
|
422
422
|
configurable: !0,
|
|
@@ -424,7 +424,7 @@ Cs[ws] === void 0 && g0(Cs, ws, {
|
|
|
424
424
|
});
|
|
425
425
|
var v0 = function(n) {
|
|
426
426
|
Cs[ws][n] = !0;
|
|
427
|
-
}, y0 =
|
|
427
|
+
}, y0 = P1, b0 = J1.findLast, w0 = v0;
|
|
428
428
|
y0({ target: "Array", proto: !0 }, {
|
|
429
429
|
findLast: function(e) {
|
|
430
430
|
return b0(this, e, arguments.length > 1 ? arguments[1] : void 0);
|
|
@@ -435,7 +435,7 @@ var C0 = Be, k0 = Ke, x0 = function(n, e) {
|
|
|
435
435
|
return k0(C0[n].prototype[e]);
|
|
436
436
|
}, S0 = x0;
|
|
437
437
|
S0("Array", "findLast");
|
|
438
|
-
var tr,
|
|
438
|
+
var tr, R, pu, mu, Et, _a, gu, vu, yu, lo, ks, xs, bu, zn = {}, wu = [], T0 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Xn = Array.isArray;
|
|
439
439
|
function nt(n, e) {
|
|
440
440
|
for (var t in e)
|
|
441
441
|
n[t] = e[t];
|
|
@@ -455,7 +455,7 @@ function We(n, e, t) {
|
|
|
455
455
|
}
|
|
456
456
|
function Mi(n, e, t, i, r) {
|
|
457
457
|
var s = { type: n, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: r == null ? ++pu : r, __i: -1, __u: 0 };
|
|
458
|
-
return r == null &&
|
|
458
|
+
return r == null && R.vnode != null && R.vnode(s), s;
|
|
459
459
|
}
|
|
460
460
|
function Na() {
|
|
461
461
|
return { current: null };
|
|
@@ -486,17 +486,17 @@ function Cu(n) {
|
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
function Ss(n) {
|
|
489
|
-
(!n.__d && (n.__d = !0) && Et.push(n) && !
|
|
489
|
+
(!n.__d && (n.__d = !0) && Et.push(n) && !Ri.__r++ || _a != R.debounceRendering) && ((_a = R.debounceRendering) || gu)(Ri);
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Ri() {
|
|
492
492
|
for (var n, e, t, i, r, s, o, a = 1; Et.length; )
|
|
493
|
-
Et.length > a && Et.sort(vu), n = Et.shift(), a = Et.length, n.__d && (t = void 0, i = void 0, r = (i = (e = n).__v).__e, s = [], o = [], e.__P && ((t = nt({}, i)).__v = i.__v + 1,
|
|
494
|
-
|
|
493
|
+
Et.length > a && Et.sort(vu), n = Et.shift(), a = Et.length, n.__d && (t = void 0, i = void 0, r = (i = (e = n).__v).__e, s = [], o = [], e.__P && ((t = nt({}, i)).__v = i.__v + 1, R.vnode && R.vnode(t), uo(e.__P, t, i, e.__n, e.__P.namespaceURI, 32 & i.__u ? [r] : null, s, r == null ? hn(i) : r, !!(32 & i.__u), o), t.__v = i.__v, t.__.__k[t.__i] = t, Su(s, t, o), i.__e = i.__ = null, t.__e != r && Cu(t)));
|
|
494
|
+
Ri.__r = 0;
|
|
495
495
|
}
|
|
496
496
|
function ku(n, e, t, i, r, s, o, a, l, c, u) {
|
|
497
497
|
var d, h, f, m, v, y, g, b = i && i.__k || wu, w = e.length;
|
|
498
498
|
for (l = M0(t, e, b, l, w), d = 0; d < w; d++)
|
|
499
|
-
(f = t.__k[d]) != null && (h = f.__i == -1 ?
|
|
499
|
+
(f = t.__k[d]) != null && (h = f.__i == -1 ? zn : b[f.__i] || zn, f.__i = d, y = uo(n, f, h, r, s, o, a, l, c, u), m = f.__e, f.ref && h.ref != f.ref && (h.ref && ho(h.ref, null, f), u.push(f.ref, f.__c || m, f)), v == null && m != null && (v = m), (g = !!(4 & f.__u)) || h.__k === f.__k ? l = xu(f, l, n, g) : typeof f.type == "function" && y !== void 0 ? l = y : m && (l = m.nextSibling), f.__u &= -7);
|
|
500
500
|
return t.__e = v, l;
|
|
501
501
|
}
|
|
502
502
|
function M0(n, e, t, i, r) {
|
|
@@ -521,9 +521,9 @@ function xu(n, e, t, i) {
|
|
|
521
521
|
while (e != null && e.nodeType == 8);
|
|
522
522
|
return e;
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function Pi(n, e) {
|
|
525
525
|
return e = e || [], n == null || typeof n == "boolean" || (Xn(n) ? n.some(function(t) {
|
|
526
|
-
|
|
526
|
+
Pi(t, e);
|
|
527
527
|
}) : e.push(n)), e;
|
|
528
528
|
}
|
|
529
529
|
function _0(n, e, t, i) {
|
|
@@ -576,7 +576,7 @@ function Oa(n) {
|
|
|
576
576
|
e.t = lo++;
|
|
577
577
|
else if (e.t < t.u)
|
|
578
578
|
return;
|
|
579
|
-
return t(
|
|
579
|
+
return t(R.event ? R.event(e) : e);
|
|
580
580
|
}
|
|
581
581
|
};
|
|
582
582
|
}
|
|
@@ -584,7 +584,7 @@ function uo(n, e, t, i, r, s, o, a, l, c) {
|
|
|
584
584
|
var u, d, h, f, m, v, y, g, b, w, C, x, T, M, O, E, V, W = e.type;
|
|
585
585
|
if (e.constructor != null)
|
|
586
586
|
return null;
|
|
587
|
-
128 & t.__u && (l = !!(32 & t.__u), s = [a = e.__e = t.__e]), (u =
|
|
587
|
+
128 & t.__u && (l = !!(32 & t.__u), s = [a = e.__e = t.__e]), (u = R.__b) && u(e);
|
|
588
588
|
e:
|
|
589
589
|
if (typeof W == "function")
|
|
590
590
|
try {
|
|
@@ -603,7 +603,7 @@ function uo(n, e, t, i, r, s, o, a, l, c) {
|
|
|
603
603
|
d.componentDidUpdate(f, m, v);
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
|
-
if (d.context = C, d.props = g, d.__P = n, d.__e = !1, T =
|
|
606
|
+
if (d.context = C, d.props = g, d.__P = n, d.__e = !1, T = R.__r, M = 0, b) {
|
|
607
607
|
for (d.state = d.__s, d.__d = !1, T && T(e), u = d.render(d.props, d.state, d.context), O = 0; O < d._sb.length; O++)
|
|
608
608
|
d.__h.push(d._sb[O]);
|
|
609
609
|
d._sb = [];
|
|
@@ -625,11 +625,11 @@ function uo(n, e, t, i, r, s, o, a, l, c) {
|
|
|
625
625
|
}
|
|
626
626
|
else
|
|
627
627
|
e.__e = t.__e, e.__k = t.__k, se.then || Ts(e);
|
|
628
|
-
|
|
628
|
+
R.__e(se, e, t);
|
|
629
629
|
}
|
|
630
630
|
else
|
|
631
631
|
s == null && e.__v == t.__v ? (e.__k = t.__k, e.__e = t.__e) : a = e.__e = N0(t.__e, e, t, i, r, s, o, l, c);
|
|
632
|
-
return (u =
|
|
632
|
+
return (u = R.diffed) && u(e), 128 & e.__u ? void 0 : a;
|
|
633
633
|
}
|
|
634
634
|
function Ts(n) {
|
|
635
635
|
n && n.__c && (n.__c.__e = !0), n && n.__k && n.__k.forEach(Ts);
|
|
@@ -637,13 +637,13 @@ function Ts(n) {
|
|
|
637
637
|
function Su(n, e, t) {
|
|
638
638
|
for (var i = 0; i < t.length; i++)
|
|
639
639
|
ho(t[i], t[++i], t[++i]);
|
|
640
|
-
|
|
640
|
+
R.__c && R.__c(e, n), n.some(function(r) {
|
|
641
641
|
try {
|
|
642
642
|
n = r.__h, r.__h = [], n.some(function(s) {
|
|
643
643
|
s.call(r);
|
|
644
644
|
});
|
|
645
645
|
} catch (s) {
|
|
646
|
-
|
|
646
|
+
R.__e(s, r.__v);
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
649
|
}
|
|
@@ -662,12 +662,12 @@ function N0(n, e, t, i, r, s, o, a, l) {
|
|
|
662
662
|
if (n == null) {
|
|
663
663
|
if (b == null)
|
|
664
664
|
return document.createTextNode(g);
|
|
665
|
-
n = document.createElementNS(r, b, g.is && g), a && (
|
|
665
|
+
n = document.createElementNS(r, b, g.is && g), a && (R.__m && R.__m(e, s), a = !1), s = null;
|
|
666
666
|
}
|
|
667
667
|
if (b == null)
|
|
668
668
|
y === g || a && n.data == g || (n.data = g);
|
|
669
669
|
else {
|
|
670
|
-
if (s = s && tr.call(n.childNodes), y = t.props ||
|
|
670
|
+
if (s = s && tr.call(n.childNodes), y = t.props || zn, !a && s != null)
|
|
671
671
|
for (y = {}, c = 0; c < n.attributes.length; c++)
|
|
672
672
|
y[(f = n.attributes[c]).name] = f.value;
|
|
673
673
|
for (c in y)
|
|
@@ -699,17 +699,17 @@ function ho(n, e, t) {
|
|
|
699
699
|
} else
|
|
700
700
|
n.current = e;
|
|
701
701
|
} catch (r) {
|
|
702
|
-
|
|
702
|
+
R.__e(r, t);
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
705
|
function Mu(n, e, t) {
|
|
706
706
|
var i, r;
|
|
707
|
-
if (
|
|
707
|
+
if (R.unmount && R.unmount(n), (i = n.ref) && (i.current && i.current != n.__e || ho(i, null, e)), (i = n.__c) != null) {
|
|
708
708
|
if (i.componentWillUnmount)
|
|
709
709
|
try {
|
|
710
710
|
i.componentWillUnmount();
|
|
711
711
|
} catch (s) {
|
|
712
|
-
|
|
712
|
+
R.__e(s, e);
|
|
713
713
|
}
|
|
714
714
|
i.base = i.__P = null;
|
|
715
715
|
}
|
|
@@ -723,7 +723,7 @@ function E0(n, e, t) {
|
|
|
723
723
|
}
|
|
724
724
|
function Ot(n, e, t) {
|
|
725
725
|
var i, r, s, o;
|
|
726
|
-
e == document && (e = document.documentElement),
|
|
726
|
+
e == document && (e = document.documentElement), R.__ && R.__(n, e), r = (i = typeof t == "function") ? null : t && t.__k || e.__k, s = [], o = [], uo(e, n = (!i && t || e).__k = We(qe, null, [n]), r || zn, zn, e.namespaceURI, !i && t ? [t] : r ? null : e.firstChild ? tr.call(e.childNodes) : null, s, !i && t ? t : r ? r.__e : e.firstChild, i, o), Su(s, n, o);
|
|
727
727
|
}
|
|
728
728
|
function O0(n) {
|
|
729
729
|
function e(t) {
|
|
@@ -748,7 +748,7 @@ function O0(n) {
|
|
|
748
748
|
return t.children(i);
|
|
749
749
|
}).contextType = e, e;
|
|
750
750
|
}
|
|
751
|
-
tr = wu.slice,
|
|
751
|
+
tr = wu.slice, R = { __e: function(n, e, t, i) {
|
|
752
752
|
for (var r, s, o; e = e.__; )
|
|
753
753
|
if ((r = e.__c) && !r.__)
|
|
754
754
|
try {
|
|
@@ -767,7 +767,7 @@ tr = wu.slice, P = { __e: function(n, e, t, i) {
|
|
|
767
767
|
this.__v && (this.__e = !0, n && this.__h.push(n), Ss(this));
|
|
768
768
|
}, Ue.prototype.render = qe, Et = [], gu = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, vu = function(n, e) {
|
|
769
769
|
return n.__v.__b - e.__v.__b;
|
|
770
|
-
},
|
|
770
|
+
}, Ri.__r = 0, yu = /(PointerCapture)$|Capture$/i, lo = 0, ks = Oa(!1), xs = Oa(!0), bu = 0;
|
|
771
771
|
var A0 = 0;
|
|
772
772
|
function p(n, e, t, i, r, s) {
|
|
773
773
|
e || (e = {});
|
|
@@ -779,7 +779,7 @@ function p(n, e, t, i, r, s) {
|
|
|
779
779
|
if (typeof n == "function" && (o = n.defaultProps))
|
|
780
780
|
for (a in o)
|
|
781
781
|
l[a] === void 0 && (l[a] = o[a]);
|
|
782
|
-
return
|
|
782
|
+
return R.vnode && R.vnode(c), c;
|
|
783
783
|
}
|
|
784
784
|
const I0 = "ibiz", D0 = "is-";
|
|
785
785
|
function St(n, e, t, i, r) {
|
|
@@ -1151,35 +1151,35 @@ En.posix = En;
|
|
|
1151
1151
|
function lt() {
|
|
1152
1152
|
return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
|
|
1153
1153
|
}
|
|
1154
|
-
function
|
|
1154
|
+
function Ie() {
|
|
1155
1155
|
return "".concat(lt() + lt(), "-").concat(lt(), "-").concat(lt(), "-").concat(lt(), "-").concat(lt()).concat(lt()).concat(lt());
|
|
1156
1156
|
}
|
|
1157
1157
|
function ci(n) {
|
|
1158
1158
|
const e = n.lastIndexOf("@");
|
|
1159
1159
|
return e === -1 ? n : n.substring(0, e);
|
|
1160
1160
|
}
|
|
1161
|
-
const
|
|
1161
|
+
const R0 = /<svg\b[^>]*>[\s\S]*?<\/svg>/;
|
|
1162
1162
|
function nr(n) {
|
|
1163
|
-
return
|
|
1163
|
+
return R0.test(n);
|
|
1164
1164
|
}
|
|
1165
|
-
const
|
|
1165
|
+
const P0 = "topic", z0 = "inline", L0 = "temp", B0 = "unknow";
|
|
1166
1166
|
function _u(n, e) {
|
|
1167
1167
|
let t = "";
|
|
1168
1168
|
switch (n) {
|
|
1169
1169
|
case "TOPIC":
|
|
1170
|
-
t +=
|
|
1170
|
+
t += P0;
|
|
1171
1171
|
break;
|
|
1172
1172
|
case "INLINE":
|
|
1173
|
-
t +=
|
|
1173
|
+
t += z0;
|
|
1174
1174
|
break;
|
|
1175
1175
|
case "TEMP":
|
|
1176
|
-
t +=
|
|
1176
|
+
t += L0;
|
|
1177
1177
|
break;
|
|
1178
1178
|
default:
|
|
1179
1179
|
t += B0;
|
|
1180
1180
|
break;
|
|
1181
1181
|
}
|
|
1182
|
-
return t += "@".concat(e ||
|
|
1182
|
+
return t += "@".concat(e || Ie(), "@").concat((/* @__PURE__ */ new Date()).getTime()), t;
|
|
1183
1183
|
}
|
|
1184
1184
|
function F0(n) {
|
|
1185
1185
|
const e = {};
|
|
@@ -1672,6 +1672,12 @@ class an {
|
|
|
1672
1672
|
* }}
|
|
1673
1673
|
*/
|
|
1674
1674
|
static parseMixedContent(e) {
|
|
1675
|
+
if (!e)
|
|
1676
|
+
return {
|
|
1677
|
+
resources: [],
|
|
1678
|
+
remainingText: "",
|
|
1679
|
+
hasResources: !1
|
|
1680
|
+
};
|
|
1675
1681
|
const i = /<resources\b[^>]*>[\s\S]*?<\/resources>/i.exec(e);
|
|
1676
1682
|
if (!i)
|
|
1677
1683
|
return {
|
|
@@ -1952,7 +1958,7 @@ class U0 {
|
|
|
1952
1958
|
return t;
|
|
1953
1959
|
}
|
|
1954
1960
|
}
|
|
1955
|
-
var Ft, J,
|
|
1961
|
+
var Ft, J, Lr, Ia, fn = 0, Au = [], Q = R, Da = Q.__b, $a = Q.__r, Ra = Q.diffed, Pa = Q.__c, za = Q.unmount, La = Q.__;
|
|
1956
1962
|
function Yn(n, e) {
|
|
1957
1963
|
Q.__h && Q.__h(J, n, fn || e), fn = 0;
|
|
1958
1964
|
var t = J.__H || (J.__H = { __: [], __h: [] });
|
|
@@ -1997,7 +2003,7 @@ function q0(n, e, t) {
|
|
|
1997
2003
|
}
|
|
1998
2004
|
return i.__N || i.__;
|
|
1999
2005
|
}
|
|
2000
|
-
function
|
|
2006
|
+
function P(n, e) {
|
|
2001
2007
|
var t = Yn(Ft++, 3);
|
|
2002
2008
|
!Q.__s && po(t.__H, e) && (t.__ = n, t.u = e, J.__H.__h.push(t));
|
|
2003
2009
|
}
|
|
@@ -2006,7 +2012,7 @@ function K0(n, e) {
|
|
|
2006
2012
|
!Q.__s && po(t.__H, e) && (t.__ = n, t.u = e, J.__h.push(t));
|
|
2007
2013
|
}
|
|
2008
2014
|
function F(n) {
|
|
2009
|
-
return fn = 5,
|
|
2015
|
+
return fn = 5, Ee(function() {
|
|
2010
2016
|
return { current: n };
|
|
2011
2017
|
}, []);
|
|
2012
2018
|
}
|
|
@@ -2024,12 +2030,12 @@ function J0(n, e, t) {
|
|
|
2024
2030
|
};
|
|
2025
2031
|
}, t == null ? t : t.concat(n));
|
|
2026
2032
|
}
|
|
2027
|
-
function
|
|
2033
|
+
function Ee(n, e) {
|
|
2028
2034
|
var t = Yn(Ft++, 7);
|
|
2029
2035
|
return po(t.__H, e) && (t.__ = n(), t.__H = e, t.__h = n), t.__;
|
|
2030
2036
|
}
|
|
2031
2037
|
function Ba(n, e) {
|
|
2032
|
-
return fn = 8,
|
|
2038
|
+
return fn = 8, Ee(function() {
|
|
2033
2039
|
return n;
|
|
2034
2040
|
}, e);
|
|
2035
2041
|
}
|
|
@@ -2049,19 +2055,19 @@ function G0() {
|
|
|
2049
2055
|
Q.__b = function(n) {
|
|
2050
2056
|
J = null, Da && Da(n);
|
|
2051
2057
|
}, Q.__ = function(n, e) {
|
|
2052
|
-
n && e.__k && e.__k.__m && (n.__m = e.__k.__m),
|
|
2058
|
+
n && e.__k && e.__k.__m && (n.__m = e.__k.__m), La && La(n, e);
|
|
2053
2059
|
}, Q.__r = function(n) {
|
|
2054
2060
|
$a && $a(n), Ft = 0;
|
|
2055
2061
|
var e = (J = n.__c).__H;
|
|
2056
|
-
e && (
|
|
2062
|
+
e && (Lr === J ? (e.__h = [], J.__h = [], e.__.forEach(function(t) {
|
|
2057
2063
|
t.__N && (t.__ = t.__N), t.u = t.__N = void 0;
|
|
2058
|
-
})) : (e.__h.forEach(_i), e.__h.forEach(Ns), e.__h = [], Ft = 0)),
|
|
2064
|
+
})) : (e.__h.forEach(_i), e.__h.forEach(Ns), e.__h = [], Ft = 0)), Lr = J;
|
|
2059
2065
|
}, Q.diffed = function(n) {
|
|
2060
|
-
|
|
2066
|
+
Ra && Ra(n);
|
|
2061
2067
|
var e = n.__c;
|
|
2062
2068
|
e && e.__H && (e.__H.__h.length && (Au.push(e) !== 1 && Ia === Q.requestAnimationFrame || ((Ia = Q.requestAnimationFrame) || X0)(G0)), e.__H.__.forEach(function(t) {
|
|
2063
2069
|
t.u && (t.__H = t.u), t.u = void 0;
|
|
2064
|
-
})),
|
|
2070
|
+
})), Lr = J = null;
|
|
2065
2071
|
}, Q.__c = function(n, e) {
|
|
2066
2072
|
e.some(function(t) {
|
|
2067
2073
|
try {
|
|
@@ -2073,9 +2079,9 @@ Q.__b = function(n) {
|
|
|
2073
2079
|
r.__h && (r.__h = []);
|
|
2074
2080
|
}), e = [], Q.__e(i, t.__v);
|
|
2075
2081
|
}
|
|
2076
|
-
}),
|
|
2082
|
+
}), Pa && Pa(n, e);
|
|
2077
2083
|
}, Q.unmount = function(n) {
|
|
2078
|
-
|
|
2084
|
+
za && za(n);
|
|
2079
2085
|
var e, t = n.__c;
|
|
2080
2086
|
t && t.__H && (t.__H.__.forEach(function(i) {
|
|
2081
2087
|
try {
|
|
@@ -2117,7 +2123,7 @@ function mo() {
|
|
|
2117
2123
|
var t = On;
|
|
2118
2124
|
for (On = void 0, Es++; t !== void 0; ) {
|
|
2119
2125
|
var i = t.o;
|
|
2120
|
-
if (t.o = void 0, t.f &= -3, !(8 & t.f) &&
|
|
2126
|
+
if (t.o = void 0, t.f &= -3, !(8 & t.f) && Ru(t))
|
|
2121
2127
|
try {
|
|
2122
2128
|
t.c();
|
|
2123
2129
|
} catch (r) {
|
|
@@ -2140,7 +2146,7 @@ function Du(n) {
|
|
|
2140
2146
|
H = e;
|
|
2141
2147
|
}
|
|
2142
2148
|
}
|
|
2143
|
-
var On = void 0, ln = 0, Es = 0,
|
|
2149
|
+
var On = void 0, ln = 0, Es = 0, zi = 0;
|
|
2144
2150
|
function $u(n) {
|
|
2145
2151
|
if (H !== void 0) {
|
|
2146
2152
|
var e = n.n;
|
|
@@ -2211,7 +2217,7 @@ Object.defineProperty(me.prototype, "value", { get: function() {
|
|
|
2211
2217
|
if (n !== this.v) {
|
|
2212
2218
|
if (Es > 100)
|
|
2213
2219
|
throw new Error("Cycle detected");
|
|
2214
|
-
this.v = n, this.i++,
|
|
2220
|
+
this.v = n, this.i++, zi++, ln++;
|
|
2215
2221
|
try {
|
|
2216
2222
|
for (var e = this.t; e !== void 0; e = e.x)
|
|
2217
2223
|
e.t.N();
|
|
@@ -2223,13 +2229,13 @@ Object.defineProperty(me.prototype, "value", { get: function() {
|
|
|
2223
2229
|
function Y(n, e) {
|
|
2224
2230
|
return new me(n, e);
|
|
2225
2231
|
}
|
|
2226
|
-
function
|
|
2232
|
+
function Ru(n) {
|
|
2227
2233
|
for (var e = n.s; e !== void 0; e = e.n)
|
|
2228
2234
|
if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i)
|
|
2229
2235
|
return !0;
|
|
2230
2236
|
return !1;
|
|
2231
2237
|
}
|
|
2232
|
-
function
|
|
2238
|
+
function Pu(n) {
|
|
2233
2239
|
for (var e = n.s; e !== void 0; e = e.n) {
|
|
2234
2240
|
var t = e.S.n;
|
|
2235
2241
|
if (t !== void 0 && (e.r = t), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
@@ -2238,7 +2244,7 @@ function Ru(n) {
|
|
|
2238
2244
|
}
|
|
2239
2245
|
}
|
|
2240
2246
|
}
|
|
2241
|
-
function
|
|
2247
|
+
function zu(n) {
|
|
2242
2248
|
for (var e = n.s, t = void 0; e !== void 0; ) {
|
|
2243
2249
|
var i = e.p;
|
|
2244
2250
|
e.i === -1 ? (e.S.U(e), i !== void 0 && (i.n = e.n), e.n !== void 0 && (e.n.p = i)) : t = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = i;
|
|
@@ -2246,25 +2252,25 @@ function Lu(n) {
|
|
|
2246
2252
|
n.s = t;
|
|
2247
2253
|
}
|
|
2248
2254
|
function qt(n, e) {
|
|
2249
|
-
me.call(this, void 0), this.x = n, this.s = void 0, this.g =
|
|
2255
|
+
me.call(this, void 0), this.x = n, this.s = void 0, this.g = zi - 1, this.f = 4, this.W = e == null ? void 0 : e.watched, this.Z = e == null ? void 0 : e.unwatched, this.name = e == null ? void 0 : e.name;
|
|
2250
2256
|
}
|
|
2251
2257
|
qt.prototype = new me();
|
|
2252
2258
|
qt.prototype.h = function() {
|
|
2253
2259
|
if (this.f &= -3, 1 & this.f)
|
|
2254
2260
|
return !1;
|
|
2255
|
-
if ((36 & this.f) == 32 || (this.f &= -5, this.g ===
|
|
2261
|
+
if ((36 & this.f) == 32 || (this.f &= -5, this.g === zi))
|
|
2256
2262
|
return !0;
|
|
2257
|
-
if (this.g =
|
|
2263
|
+
if (this.g = zi, this.f |= 1, this.i > 0 && !Ru(this))
|
|
2258
2264
|
return this.f &= -2, !0;
|
|
2259
2265
|
var n = H;
|
|
2260
2266
|
try {
|
|
2261
|
-
|
|
2267
|
+
Pu(this), H = this;
|
|
2262
2268
|
var e = this.x();
|
|
2263
2269
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
2264
2270
|
} catch (t) {
|
|
2265
2271
|
this.v = t, this.f |= 16, this.i++;
|
|
2266
2272
|
}
|
|
2267
|
-
return H = n,
|
|
2273
|
+
return H = n, zu(this), this.f &= -2, !0;
|
|
2268
2274
|
};
|
|
2269
2275
|
qt.prototype.S = function(n) {
|
|
2270
2276
|
if (this.t === void 0) {
|
|
@@ -2299,7 +2305,7 @@ Object.defineProperty(qt.prototype, "value", { get: function() {
|
|
|
2299
2305
|
function go(n, e) {
|
|
2300
2306
|
return new qt(n, e);
|
|
2301
2307
|
}
|
|
2302
|
-
function
|
|
2308
|
+
function Lu(n) {
|
|
2303
2309
|
var e = n.u;
|
|
2304
2310
|
if (n.u = void 0, typeof e == "function") {
|
|
2305
2311
|
ln++;
|
|
@@ -2317,12 +2323,12 @@ function zu(n) {
|
|
|
2317
2323
|
function vo(n) {
|
|
2318
2324
|
for (var e = n.s; e !== void 0; e = e.n)
|
|
2319
2325
|
e.S.U(e);
|
|
2320
|
-
n.x = void 0, n.s = void 0,
|
|
2326
|
+
n.x = void 0, n.s = void 0, Lu(n);
|
|
2321
2327
|
}
|
|
2322
2328
|
function Z0(n) {
|
|
2323
2329
|
if (H !== this)
|
|
2324
2330
|
throw new Error("Out-of-order effect");
|
|
2325
|
-
|
|
2331
|
+
zu(this), H = n, this.f &= -2, 8 & this.f && vo(this), mo();
|
|
2326
2332
|
}
|
|
2327
2333
|
function Cn(n, e) {
|
|
2328
2334
|
this.x = n, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e == null ? void 0 : e.name;
|
|
@@ -2341,7 +2347,7 @@ Cn.prototype.c = function() {
|
|
|
2341
2347
|
Cn.prototype.S = function() {
|
|
2342
2348
|
if (1 & this.f)
|
|
2343
2349
|
throw new Error("Cycle detected");
|
|
2344
|
-
this.f |= 1, this.f &= -9,
|
|
2350
|
+
this.f |= 1, this.f &= -9, Lu(this), Pu(this), ln++;
|
|
2345
2351
|
var n = H;
|
|
2346
2352
|
return H = this, Z0.bind(this, n);
|
|
2347
2353
|
};
|
|
@@ -2366,16 +2372,16 @@ function yo(n, e) {
|
|
|
2366
2372
|
}
|
|
2367
2373
|
var ir, Br;
|
|
2368
2374
|
function kn(n, e) {
|
|
2369
|
-
|
|
2375
|
+
R[n] = e.bind(null, R[n] || function() {
|
|
2370
2376
|
});
|
|
2371
2377
|
}
|
|
2372
|
-
function
|
|
2378
|
+
function Li(n) {
|
|
2373
2379
|
Br && Br(), Br = n && n.S();
|
|
2374
2380
|
}
|
|
2375
2381
|
function Bu(n) {
|
|
2376
2382
|
var e = this, t = n.data, i = $(t);
|
|
2377
2383
|
i.value = t;
|
|
2378
|
-
var r =
|
|
2384
|
+
var r = Ee(function() {
|
|
2379
2385
|
for (var s = e.__v; s = s.__; )
|
|
2380
2386
|
if (s.__c) {
|
|
2381
2387
|
s.__c.__$f |= 4;
|
|
@@ -2407,7 +2413,7 @@ kn("__b", function(n, e) {
|
|
|
2407
2413
|
n(e);
|
|
2408
2414
|
});
|
|
2409
2415
|
kn("__r", function(n, e) {
|
|
2410
|
-
|
|
2416
|
+
Li();
|
|
2411
2417
|
var t, i = e.__c;
|
|
2412
2418
|
i && (i.__$f &= -2, (t = i.__$u) === void 0 && (i.__$u = t = function(r) {
|
|
2413
2419
|
var s;
|
|
@@ -2416,13 +2422,13 @@ kn("__r", function(n, e) {
|
|
|
2416
2422
|
}), s.c = function() {
|
|
2417
2423
|
i.__$f |= 1, i.setState({});
|
|
2418
2424
|
}, s;
|
|
2419
|
-
}())), ir = i,
|
|
2425
|
+
}())), ir = i, Li(t), n(e);
|
|
2420
2426
|
});
|
|
2421
2427
|
kn("__e", function(n, e, t, i) {
|
|
2422
|
-
|
|
2428
|
+
Li(), ir = void 0, n(e, t, i);
|
|
2423
2429
|
});
|
|
2424
2430
|
kn("diffed", function(n, e) {
|
|
2425
|
-
|
|
2431
|
+
Li(), ir = void 0;
|
|
2426
2432
|
var t;
|
|
2427
2433
|
if (typeof e.type == "string" && (t = e.__e)) {
|
|
2428
2434
|
var i = e.__np, r = e.props;
|
|
@@ -2495,13 +2501,13 @@ Ue.prototype.shouldComponentUpdate = function(n, e) {
|
|
|
2495
2501
|
return !1;
|
|
2496
2502
|
};
|
|
2497
2503
|
function $(n) {
|
|
2498
|
-
return
|
|
2504
|
+
return Ee(function() {
|
|
2499
2505
|
return Y(n);
|
|
2500
2506
|
}, []);
|
|
2501
2507
|
}
|
|
2502
2508
|
function be(n) {
|
|
2503
2509
|
var e = F(n);
|
|
2504
|
-
return e.current = n, ir.__$f |= 4,
|
|
2510
|
+
return e.current = n, ir.__$f |= 4, Ee(function() {
|
|
2505
2511
|
return go(function() {
|
|
2506
2512
|
return e.current();
|
|
2507
2513
|
});
|
|
@@ -3151,7 +3157,7 @@ const Fu = () => /* @__PURE__ */ p("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
3151
3157
|
/* @__PURE__ */ p("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
|
|
3152
3158
|
]
|
|
3153
3159
|
}
|
|
3154
|
-
),
|
|
3160
|
+
), Ln = (n) => /* @__PURE__ */ p(
|
|
3155
3161
|
"svg",
|
|
3156
3162
|
{
|
|
3157
3163
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -3498,7 +3504,7 @@ const Fu = () => /* @__PURE__ */ p("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
3498
3504
|
}
|
|
3499
3505
|
), Dg = ({ text: n }) => {
|
|
3500
3506
|
const [e, t] = j(n), i = F(null);
|
|
3501
|
-
return
|
|
3507
|
+
return P(() => (i.current && clearTimeout(i.current), i.current = setTimeout(() => {
|
|
3502
3508
|
t(n);
|
|
3503
3509
|
}, 100), () => {
|
|
3504
3510
|
i.current && clearTimeout(i.current);
|
|
@@ -3605,7 +3611,7 @@ const Fu = () => /* @__PURE__ */ p("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
3605
3611
|
cancel: "Cancel",
|
|
3606
3612
|
send: "Send",
|
|
3607
3613
|
unknownError: "Unknown error"
|
|
3608
|
-
},
|
|
3614
|
+
}, Rg = {
|
|
3609
3615
|
disabled: "禁用",
|
|
3610
3616
|
enable: "启用",
|
|
3611
3617
|
automatic: "自动",
|
|
@@ -3708,7 +3714,7 @@ const Fu = () => /* @__PURE__ */ p("svg", { viewBox: "0 0 1024 1024", version: "
|
|
|
3708
3714
|
send: "发送",
|
|
3709
3715
|
unknownError: "未知错误"
|
|
3710
3716
|
};
|
|
3711
|
-
class
|
|
3717
|
+
class Pg {
|
|
3712
3718
|
constructor() {
|
|
3713
3719
|
/**
|
|
3714
3720
|
* @description 区域
|
|
@@ -3726,7 +3732,7 @@ class Rg {
|
|
|
3726
3732
|
*/
|
|
3727
3733
|
N(this, "language", {
|
|
3728
3734
|
en: $g,
|
|
3729
|
-
"zh-CN":
|
|
3735
|
+
"zh-CN": Rg
|
|
3730
3736
|
});
|
|
3731
3737
|
/**
|
|
3732
3738
|
* @description 翻译函数,会自动响应语言变化
|
|
@@ -3758,7 +3764,7 @@ class Rg {
|
|
|
3758
3764
|
});
|
|
3759
3765
|
}
|
|
3760
3766
|
}
|
|
3761
|
-
const k = new
|
|
3767
|
+
const k = new Pg();
|
|
3762
3768
|
const wo = (n) => {
|
|
3763
3769
|
const { item: e } = n, t = new B("chat-think"), i = F(null), r = $(""), s = $(e.collapse || !0), o = $(!1);
|
|
3764
3770
|
let a;
|
|
@@ -3774,7 +3780,7 @@ const wo = (n) => {
|
|
|
3774
3780
|
behavior: "auto"
|
|
3775
3781
|
});
|
|
3776
3782
|
};
|
|
3777
|
-
|
|
3783
|
+
P(() => {
|
|
3778
3784
|
if (e.beginTime) {
|
|
3779
3785
|
const d = e.endTime || Date.now();
|
|
3780
3786
|
r.value = ((d - e.beginTime) / 1e3).toFixed(1);
|
|
@@ -3803,7 +3809,7 @@ const wo = (n) => {
|
|
|
3803
3809
|
k.t.value("second"),
|
|
3804
3810
|
")"
|
|
3805
3811
|
] }) : null,
|
|
3806
|
-
/* @__PURE__ */ p(
|
|
3812
|
+
/* @__PURE__ */ p(Ln, {})
|
|
3807
3813
|
] })
|
|
3808
3814
|
] }),
|
|
3809
3815
|
/* @__PURE__ */ p("div", { className: t.e("content"), ref: i, children: /* @__PURE__ */ p(Dg, { text: e.description }) }),
|
|
@@ -3820,7 +3826,7 @@ const wo = (n) => {
|
|
|
3820
3826
|
}
|
|
3821
3827
|
);
|
|
3822
3828
|
};
|
|
3823
|
-
const
|
|
3829
|
+
const zg = (n) => {
|
|
3824
3830
|
const { suggestions: e, onSuggestionClick: t, uiactions: i, onUIActionClick: r } = n, s = (l, c) => {
|
|
3825
3831
|
t == null || t(l, c);
|
|
3826
3832
|
}, o = (l, c) => {
|
|
@@ -3858,7 +3864,7 @@ const Lg = (n) => {
|
|
|
3858
3864
|
))
|
|
3859
3865
|
] });
|
|
3860
3866
|
};
|
|
3861
|
-
const
|
|
3867
|
+
const Lg = (n) => {
|
|
3862
3868
|
var u, d;
|
|
3863
3869
|
const e = new B("default-tool-call"), t = $(!1), i = $(!1);
|
|
3864
3870
|
let r;
|
|
@@ -3871,7 +3877,7 @@ const zg = (n) => {
|
|
|
3871
3877
|
i.value = !1;
|
|
3872
3878
|
}, 2e3));
|
|
3873
3879
|
};
|
|
3874
|
-
|
|
3880
|
+
P(() => () => {
|
|
3875
3881
|
r && clearTimeout(r);
|
|
3876
3882
|
}, []);
|
|
3877
3883
|
const a = (h) => typeof h == "string" ? h.includes("Failed") || h.includes("Error") || h.includes("ERR_") ? '<span class="error">"'.concat(h, '"</span>') : '<span class="string">"'.concat(h, '"</span>') : typeof h == "number" ? '<span class="number">'.concat(h, "</span>") : typeof h == "boolean" ? '<span class="boolean">'.concat(h, "</span>") : h === null ? '<span class="null">null</span>' : "", l = (h, f = 0) => {
|
|
@@ -3929,7 +3935,7 @@ const zg = (n) => {
|
|
|
3929
3935
|
}
|
|
3930
3936
|
),
|
|
3931
3937
|
/* @__PURE__ */ p(
|
|
3932
|
-
|
|
3938
|
+
Ln,
|
|
3933
3939
|
{
|
|
3934
3940
|
style: {
|
|
3935
3941
|
"margin-left": " 6px",
|
|
@@ -3965,7 +3971,7 @@ const Bg = (n) => {
|
|
|
3965
3971
|
const b = /\[(.+?)\]\((.+?)\)/g;
|
|
3966
3972
|
return g.replace(b, (w, C, x) => '<a href="'.concat(x, '">').concat(C, "</a>"));
|
|
3967
3973
|
};
|
|
3968
|
-
|
|
3974
|
+
P(() => {
|
|
3969
3975
|
var C;
|
|
3970
3976
|
const g = hf(((C = n.item.result) == null ? void 0 : C.chunks) || []), b = g.filter(
|
|
3971
3977
|
(x) => x.type === "SOURCE"
|
|
@@ -3975,7 +3981,7 @@ const Bg = (n) => {
|
|
|
3975
3981
|
w.forEach((x) => {
|
|
3976
3982
|
x.type === "CLUSTER" && (x.children = b.filter((T) => T.pid === x.id), x.isExpand = !1);
|
|
3977
3983
|
}), t.value = w;
|
|
3978
|
-
}, [n.item]),
|
|
3984
|
+
}, [n.item]), P(() => () => {
|
|
3979
3985
|
s && clearTimeout(s);
|
|
3980
3986
|
}, []);
|
|
3981
3987
|
const c = (g, b) => {
|
|
@@ -4041,7 +4047,7 @@ const Bg = (n) => {
|
|
|
4041
4047
|
onClick: (C) => c(C, g),
|
|
4042
4048
|
children: [
|
|
4043
4049
|
/* @__PURE__ */ p(
|
|
4044
|
-
|
|
4050
|
+
Ln,
|
|
4045
4051
|
{
|
|
4046
4052
|
style: {
|
|
4047
4053
|
transform: g.isExpand ? "rotate(90deg)" : "rotate(0deg)"
|
|
@@ -4089,7 +4095,7 @@ const Bg = (n) => {
|
|
|
4089
4095
|
}
|
|
4090
4096
|
),
|
|
4091
4097
|
/* @__PURE__ */ p(
|
|
4092
|
-
|
|
4098
|
+
Ln,
|
|
4093
4099
|
{
|
|
4094
4100
|
style: {
|
|
4095
4101
|
"margin-left": " 6px",
|
|
@@ -4162,7 +4168,7 @@ const Vg = (n) => {
|
|
|
4162
4168
|
r.value = !1;
|
|
4163
4169
|
}, 2e3));
|
|
4164
4170
|
};
|
|
4165
|
-
|
|
4171
|
+
P(() => () => {
|
|
4166
4172
|
s && clearTimeout(s);
|
|
4167
4173
|
}, []);
|
|
4168
4174
|
const l = () => {
|
|
@@ -4210,7 +4216,7 @@ const Vg = (n) => {
|
|
|
4210
4216
|
}
|
|
4211
4217
|
),
|
|
4212
4218
|
/* @__PURE__ */ p(
|
|
4213
|
-
|
|
4219
|
+
Ln,
|
|
4214
4220
|
{
|
|
4215
4221
|
style: {
|
|
4216
4222
|
"margin-left": " 6px",
|
|
@@ -4241,7 +4247,7 @@ const Hg = (n) => {
|
|
|
4241
4247
|
t = Vg;
|
|
4242
4248
|
break;
|
|
4243
4249
|
default:
|
|
4244
|
-
t =
|
|
4250
|
+
t = Lg;
|
|
4245
4251
|
}
|
|
4246
4252
|
return We(t, {
|
|
4247
4253
|
item: n.item,
|
|
@@ -4260,7 +4266,7 @@ const Co = (n) => {
|
|
|
4260
4266
|
const { items: e, onLinkClick: t, onCollapseChange: i } = n, r = new B("chat-tool-call"), s = $([]), o = $(!1), a = $(!1), l = (d) => {
|
|
4261
4267
|
t == null || t(d);
|
|
4262
4268
|
};
|
|
4263
|
-
|
|
4269
|
+
P(() => {
|
|
4264
4270
|
s.value = e.filter((d) => d), a.value = e.length > 4;
|
|
4265
4271
|
}, [e]);
|
|
4266
4272
|
const c = be(() => a.value && !o.value ? s.value.slice(0, 4) : s.value), u = () => {
|
|
@@ -4295,7 +4301,7 @@ const ui = new B("chat-search"), ko = (n) => {
|
|
|
4295
4301
|
onChange: s,
|
|
4296
4302
|
onEnter: o
|
|
4297
4303
|
} = n, [a, l] = j(!1), c = F(null);
|
|
4298
|
-
|
|
4304
|
+
P(() => {
|
|
4299
4305
|
var h;
|
|
4300
4306
|
r && ((h = c.current) == null || h.focus());
|
|
4301
4307
|
}, []);
|
|
@@ -4355,13 +4361,13 @@ const ve = new B("chat-single-select"), Gu = (n) => {
|
|
|
4355
4361
|
onChange: u,
|
|
4356
4362
|
onSearch: d
|
|
4357
4363
|
} = n, h = !!t.length, f = F(null), m = F(null), v = $(""), [y, g] = j(e), [b, w] = j(t), [C, x] = j(!1), [T, M] = j(!1), O = ((at = t.find((U) => U.value === y)) == null ? void 0 : at.label) || l;
|
|
4358
|
-
|
|
4364
|
+
P(() => {
|
|
4359
4365
|
C === !1 && (v.value = "", w(t));
|
|
4360
|
-
}, [C]),
|
|
4366
|
+
}, [C]), P(() => {
|
|
4361
4367
|
g(e);
|
|
4362
|
-
}, [e]),
|
|
4368
|
+
}, [e]), P(() => {
|
|
4363
4369
|
w(t);
|
|
4364
|
-
}, [t]),
|
|
4370
|
+
}, [t]), P(() => {
|
|
4365
4371
|
const U = (oe) => {
|
|
4366
4372
|
var ti, Xo;
|
|
4367
4373
|
!h || s || (ti = m.current) != null && ti.contains(oe.target) || ((Xo = f.current) != null && Xo.contains(oe.target) ? x((lf) => !lf) : x(!1));
|
|
@@ -4450,13 +4456,13 @@ const ke = new B("chat-multiple-select"), jg = (n) => {
|
|
|
4450
4456
|
onChange: a,
|
|
4451
4457
|
onSearch: l
|
|
4452
4458
|
} = n, c = F(null), u = F(null), d = $(""), [h, f] = j(!1), [m, v] = j(!1), [y, g] = j(e || []), [b, w] = j(t);
|
|
4453
|
-
|
|
4459
|
+
P(() => {
|
|
4454
4460
|
h === !1 && (d.value = "", w(t));
|
|
4455
|
-
}, [h]),
|
|
4461
|
+
}, [h]), P(() => {
|
|
4456
4462
|
g(e || []);
|
|
4457
|
-
}, [e]),
|
|
4463
|
+
}, [e]), P(() => {
|
|
4458
4464
|
w(t);
|
|
4459
|
-
}, [t]),
|
|
4465
|
+
}, [t]), P(() => {
|
|
4460
4466
|
const E = (V) => {
|
|
4461
4467
|
var W, se;
|
|
4462
4468
|
V.stopPropagation(), !(V.target && ((W = u.current) != null && W.contains(V.target))) && ((se = c.current) != null && se.contains(V.target) ? f((at) => !at) : f(!1));
|
|
@@ -4573,8 +4579,8 @@ function Ga(n, e) {
|
|
|
4573
4579
|
(Ga.prototype = new Ue()).isPureReactComponent = !0, Ga.prototype.shouldComponentUpdate = function(n, e) {
|
|
4574
4580
|
return Ja(this.props, n) || Ja(this.state, e);
|
|
4575
4581
|
};
|
|
4576
|
-
var Xa =
|
|
4577
|
-
|
|
4582
|
+
var Xa = R.__b;
|
|
4583
|
+
R.__b = function(n) {
|
|
4578
4584
|
n.type && n.type.__f && n.ref && (n.props.ref = n.ref, n.ref = null), Xa && Xa(n);
|
|
4579
4585
|
};
|
|
4580
4586
|
var Wg = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
|
|
@@ -4585,8 +4591,8 @@ function Ug(n) {
|
|
|
4585
4591
|
}
|
|
4586
4592
|
return e.$$typeof = Wg, e.render = n, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (n.displayName || n.name) + ")", e;
|
|
4587
4593
|
}
|
|
4588
|
-
var qg =
|
|
4589
|
-
|
|
4594
|
+
var qg = R.__e;
|
|
4595
|
+
R.__e = function(n, e, t, i) {
|
|
4590
4596
|
if (n.then) {
|
|
4591
4597
|
for (var r, s = e; s = s.__; )
|
|
4592
4598
|
if ((r = s.__c) && r.__c)
|
|
@@ -4594,7 +4600,7 @@ P.__e = function(n, e, t, i) {
|
|
|
4594
4600
|
}
|
|
4595
4601
|
qg(n, e, t, i);
|
|
4596
4602
|
};
|
|
4597
|
-
var Ya =
|
|
4603
|
+
var Ya = R.unmount;
|
|
4598
4604
|
function Yu(n, e, t) {
|
|
4599
4605
|
return n && (n.__c && n.__c.__H && (n.__c.__H.__.forEach(function(i) {
|
|
4600
4606
|
typeof i.__c == "function" && i.__c();
|
|
@@ -4617,7 +4623,7 @@ function Qu(n) {
|
|
|
4617
4623
|
function di() {
|
|
4618
4624
|
this.i = null, this.l = null;
|
|
4619
4625
|
}
|
|
4620
|
-
|
|
4626
|
+
R.unmount = function(n) {
|
|
4621
4627
|
var e = n.__c;
|
|
4622
4628
|
e && e.__R && e.__R(), e && 32 & n.__u && (n.type = null), Ya && Ya(n);
|
|
4623
4629
|
}, (Vr.prototype = new Ue()).__c = function(n, e) {
|
|
@@ -4698,7 +4704,7 @@ function Gg(n, e) {
|
|
|
4698
4704
|
};
|
|
4699
4705
|
}, di.prototype.render = function(n) {
|
|
4700
4706
|
this.i = null, this.l = /* @__PURE__ */ new Map();
|
|
4701
|
-
var e =
|
|
4707
|
+
var e = Pi(n.children);
|
|
4702
4708
|
n.revealOrder && n.revealOrder[0] === "b" && e.reverse();
|
|
4703
4709
|
for (var t = e.length; t--; )
|
|
4704
4710
|
this.l.set(e[t], this.i = [1, 0, this.i]);
|
|
@@ -4719,7 +4725,7 @@ Ue.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceive
|
|
|
4719
4725
|
Object.defineProperty(this, n, { configurable: !0, writable: !0, value: e });
|
|
4720
4726
|
} });
|
|
4721
4727
|
});
|
|
4722
|
-
var Qa =
|
|
4728
|
+
var Qa = R.event;
|
|
4723
4729
|
function n2() {
|
|
4724
4730
|
}
|
|
4725
4731
|
function i2() {
|
|
@@ -4728,13 +4734,13 @@ function i2() {
|
|
|
4728
4734
|
function r2() {
|
|
4729
4735
|
return this.defaultPrevented;
|
|
4730
4736
|
}
|
|
4731
|
-
|
|
4737
|
+
R.event = function(n) {
|
|
4732
4738
|
return Qa && (n = Qa(n)), n.persist = n2, n.isPropagationStopped = i2, n.isDefaultPrevented = r2, n.nativeEvent = n;
|
|
4733
4739
|
};
|
|
4734
4740
|
var s2 = { enumerable: !1, configurable: !0, get: function() {
|
|
4735
4741
|
return this.class;
|
|
4736
|
-
} }, el =
|
|
4737
|
-
|
|
4742
|
+
} }, el = R.vnode;
|
|
4743
|
+
R.vnode = function(n) {
|
|
4738
4744
|
typeof n.type == "string" && function(e) {
|
|
4739
4745
|
var t = e.props, i = e.type, r = {}, s = i.indexOf("-") === -1;
|
|
4740
4746
|
for (var o in t) {
|
|
@@ -4744,19 +4750,19 @@ P.vnode = function(n) {
|
|
|
4744
4750
|
o === "defaultValue" && "value" in t && t.value == null ? o = "value" : o === "download" && a === !0 ? a = "" : l === "translate" && a === "no" ? a = !1 : l[0] === "o" && l[1] === "n" ? l === "ondoubleclick" ? o = "ondblclick" : l !== "onchange" || i !== "input" && i !== "textarea" || t2(t.type) ? l === "onfocus" ? o = "onfocusin" : l === "onblur" ? o = "onfocusout" : Zg.test(o) && (o = l) : l = o = "oninput" : s && Yg.test(o) ? o = o.replace(Qg, "-$&").toLowerCase() : a === null && (a = void 0), l === "oninput" && r[o = l] && (o = "oninputCapture"), r[o] = a;
|
|
4745
4751
|
}
|
|
4746
4752
|
}
|
|
4747
|
-
i == "select" && r.multiple && Array.isArray(r.value) && (r.value =
|
|
4753
|
+
i == "select" && r.multiple && Array.isArray(r.value) && (r.value = Pi(t.children).forEach(function(c) {
|
|
4748
4754
|
c.props.selected = r.value.indexOf(c.props.value) != -1;
|
|
4749
|
-
})), i == "select" && r.defaultValue != null && (r.value =
|
|
4755
|
+
})), i == "select" && r.defaultValue != null && (r.value = Pi(t.children).forEach(function(c) {
|
|
4750
4756
|
c.props.selected = r.multiple ? r.defaultValue.indexOf(c.props.value) != -1 : r.defaultValue == c.props.value;
|
|
4751
4757
|
})), t.class && !t.className ? (r.class = t.class, Object.defineProperty(r, "className", s2)) : (t.className && !t.class || t.class && t.className) && (r.class = r.className = t.className), e.props = r;
|
|
4752
4758
|
}(n), n.$$typeof = Xg, el && el(n);
|
|
4753
4759
|
};
|
|
4754
|
-
var tl =
|
|
4755
|
-
|
|
4760
|
+
var tl = R.__r;
|
|
4761
|
+
R.__r = function(n) {
|
|
4756
4762
|
tl && tl(n), n.__c;
|
|
4757
4763
|
};
|
|
4758
|
-
var nl =
|
|
4759
|
-
|
|
4764
|
+
var nl = R.diffed;
|
|
4765
|
+
R.diffed = function(n) {
|
|
4760
4766
|
nl && nl(n);
|
|
4761
4767
|
var e = n.props, t = n.__e;
|
|
4762
4768
|
t != null && n.type === "textarea" && "value" in e && e.value !== t.value && (t.value = e.value == null ? "" : e.value);
|
|
@@ -4774,11 +4780,11 @@ const xo = ({
|
|
|
4774
4780
|
// 接收行为事件回调
|
|
4775
4781
|
}) => {
|
|
4776
4782
|
const l = new B("pop"), c = fo(wr), [u, d] = j(s || !1), h = F(null), f = F(null), m = F(null);
|
|
4777
|
-
|
|
4783
|
+
P(() => {
|
|
4778
4784
|
s !== void 0 && d(s);
|
|
4779
|
-
}, [s]),
|
|
4785
|
+
}, [s]), P(() => (f.current || (f.current = document.createElement("div"), f.current.className = l.b("content-container"), document.body.appendChild(f.current)), () => {
|
|
4780
4786
|
f.current && document.body.removeChild(f.current);
|
|
4781
|
-
}), []),
|
|
4787
|
+
}), []), P(() => {
|
|
4782
4788
|
const C = (x) => {
|
|
4783
4789
|
h.current && !h.current.contains(x.target) && !x.target.closest(".".concat(l.b())) && !x.target.closest(".ibiz-quick-edit") && !x.target.closest(".ibiz-picker__transfer") && (d(!1), o == null || o(!1));
|
|
4784
4790
|
};
|
|
@@ -4921,7 +4927,7 @@ const hi = new B("messsage-toolbar"), o2 = (n) => {
|
|
|
4921
4927
|
}
|
|
4922
4928
|
}
|
|
4923
4929
|
) : /* @__PURE__ */ p("img", { src: h.icon.imagePath });
|
|
4924
|
-
}, u =
|
|
4930
|
+
}, u = Ee(() => t.state === 20 && t.completed !== !0, [t.state, t.completed]), d = e.resourceMode !== "REMOTE" || e.currentTopicDisableStorage;
|
|
4925
4931
|
return u ? /* @__PURE__ */ p(qe, {}) : /* @__PURE__ */ p("div", { className: "".concat(hi.b()), children: [
|
|
4926
4932
|
/* @__PURE__ */ p(
|
|
4927
4933
|
xo,
|
|
@@ -4963,7 +4969,7 @@ const hi = new B("messsage-toolbar"), o2 = (n) => {
|
|
|
4963
4969
|
newPosition: 0,
|
|
4964
4970
|
startPosition: 0
|
|
4965
4971
|
}), u = be(() => "".concat((a.value - t) / (i - t) * 100, "%"));
|
|
4966
|
-
|
|
4972
|
+
P(() => {
|
|
4967
4973
|
a.value = n.value;
|
|
4968
4974
|
}, [n.value]);
|
|
4969
4975
|
const d = (g) => {
|
|
@@ -5027,7 +5033,7 @@ const fi = new B("chat-slider"), rl = (n) => {
|
|
|
5027
5033
|
width: "".concat(100 * (u.value - t) / (i - t), "%"),
|
|
5028
5034
|
left: "0%"
|
|
5029
5035
|
}));
|
|
5030
|
-
|
|
5036
|
+
P(() => {
|
|
5031
5037
|
r !== void 0 && (u.value = r);
|
|
5032
5038
|
}, [r]);
|
|
5033
5039
|
const h = (m) => {
|
|
@@ -5071,7 +5077,7 @@ const fi = new B("chat-slider"), rl = (n) => {
|
|
|
5071
5077
|
};
|
|
5072
5078
|
const pi = new B("chat-switch"), l2 = (n) => {
|
|
5073
5079
|
const { value: e, className: t = "", showText: i = !1, onChange: r } = n, [s, o] = j(void 0), [a, l] = j(e);
|
|
5074
|
-
|
|
5080
|
+
P(() => {
|
|
5075
5081
|
l(e);
|
|
5076
5082
|
}, [e]);
|
|
5077
5083
|
const c = () => {
|
|
@@ -5124,9 +5130,9 @@ const Fe = new B("chat-step-item"), c2 = (n) => {
|
|
|
5124
5130
|
const E = Eu.parse(T).toolCalls || [];
|
|
5125
5131
|
T = T.replace(/<tool_call>[\s\S]*?<\/tool_call>/g, ""), h.value.description = x || "", u.value = T || "", d.value = E;
|
|
5126
5132
|
};
|
|
5127
|
-
|
|
5133
|
+
P(() => {
|
|
5128
5134
|
g(), y(), b(), v();
|
|
5129
|
-
}, []),
|
|
5135
|
+
}, []), P(() => {
|
|
5130
5136
|
setTimeout(() => {
|
|
5131
5137
|
g();
|
|
5132
5138
|
}, 0);
|
|
@@ -5207,7 +5213,7 @@ const Fe = new B("chat-step-item"), c2 = (n) => {
|
|
|
5207
5213
|
};
|
|
5208
5214
|
const mi = new B("chat-step"), ed = (n) => {
|
|
5209
5215
|
const { items: e } = n, t = $(!1), i = $(!0), r = $([]);
|
|
5210
|
-
|
|
5216
|
+
P(() => {
|
|
5211
5217
|
t.value = e.length > 1, r.value = t.value && !i.value ? [e[e.length - 1]] : e;
|
|
5212
5218
|
}, [e]);
|
|
5213
5219
|
const s = () => {
|
|
@@ -5360,7 +5366,7 @@ const Hr = new B("chat-input-material-item"), or = (n) => {
|
|
|
5360
5366
|
] });
|
|
5361
5367
|
};
|
|
5362
5368
|
const Tt = new B("markdown-message"), h2 = (n) => {
|
|
5363
|
-
const { message: e, size: t } = n, i =
|
|
5369
|
+
const { message: e, size: t } = n, i = F(null), r = $(null), s = $({ resources: [], remainingText: "", hasResources: !1 }), o = (g) => {
|
|
5364
5370
|
const { resources: b, remainingText: w, hasResources: C, error: x } = an.parseMixedContent(g);
|
|
5365
5371
|
s.value = {
|
|
5366
5372
|
resources: b,
|
|
@@ -5368,7 +5374,7 @@ const Tt = new B("markdown-message"), h2 = (n) => {
|
|
|
5368
5374
|
hasResources: C,
|
|
5369
5375
|
error: x
|
|
5370
5376
|
};
|
|
5371
|
-
}, a =
|
|
5377
|
+
}, a = Ee(() => e.state === 20 && e.completed !== !0, [e.state, e.completed]), l = Ee(() => e.state === 20 && e.completed === !0, [e.state, e.completed]);
|
|
5372
5378
|
e.think || (e.think = {
|
|
5373
5379
|
title: "",
|
|
5374
5380
|
description: "",
|
|
@@ -5422,25 +5428,39 @@ const Tt = new B("markdown-message"), h2 = (n) => {
|
|
|
5422
5428
|
return !1;
|
|
5423
5429
|
}
|
|
5424
5430
|
};
|
|
5425
|
-
|
|
5426
|
-
if (
|
|
5427
|
-
|
|
5431
|
+
P(() => {
|
|
5432
|
+
if (window.ibiz.log.debug(
|
|
5433
|
+
"markdown-message-conentchange------消息内容",
|
|
5434
|
+
e.content
|
|
5435
|
+
), window.ibiz.log.debug(
|
|
5436
|
+
"markdown-message-conentchange------md编辑器实例",
|
|
5437
|
+
r.value
|
|
5438
|
+
), window.ibiz.log.debug("markdown-message------消息内容长度", t), t >= 0 && r.value) {
|
|
5439
|
+
if (e.content && e.content.indexOf("<think>") !== -1) {
|
|
5428
5440
|
const { isThoughtCompleted: g, thoughtContent: b, answerContent: w } = m(e.content);
|
|
5429
5441
|
c(g, b), o(w);
|
|
5430
5442
|
} else
|
|
5431
5443
|
o(e.content);
|
|
5432
|
-
|
|
5444
|
+
window.ibiz.log.debug(
|
|
5445
|
+
"markdown-message-conentchange------设置消息内容",
|
|
5446
|
+
s.value.remainingText
|
|
5447
|
+
), r.value.setMarkdown(s.value.remainingText || ""), d(e.suggestions);
|
|
5433
5448
|
}
|
|
5434
|
-
}, [e, t]),
|
|
5449
|
+
}, [e, t]), P(() => {
|
|
5435
5450
|
let g = "";
|
|
5436
|
-
if (
|
|
5451
|
+
if (window.ibiz.log.debug(
|
|
5452
|
+
"markdown-message-init------计算前的消息内容",
|
|
5453
|
+
e.content
|
|
5454
|
+
), e.content && e.content.indexOf("<think>") !== -1) {
|
|
5437
5455
|
const { isThoughtCompleted: b, thoughtContent: w, answerContent: C } = m(e.content);
|
|
5438
5456
|
c(b, w), C && o(C);
|
|
5439
5457
|
} else
|
|
5440
5458
|
o(e.content);
|
|
5441
|
-
g = s.value.remainingText, d(e.suggestions),
|
|
5442
|
-
|
|
5443
|
-
|
|
5459
|
+
g = s.value.remainingText, d(e.suggestions), window.ibiz.log.debug(
|
|
5460
|
+
"markdown-message-init------计算后的消息内容",
|
|
5461
|
+
g
|
|
5462
|
+
), r.value = new Ys({
|
|
5463
|
+
el: i.current,
|
|
5444
5464
|
value: g || "",
|
|
5445
5465
|
editor: {
|
|
5446
5466
|
defaultModel: "previewOnly"
|
|
@@ -5471,7 +5491,7 @@ const Tt = new B("markdown-message"), h2 = (n) => {
|
|
|
5471
5491
|
}, []);
|
|
5472
5492
|
const y = (g) => {
|
|
5473
5493
|
var w, C;
|
|
5474
|
-
const b = (g === "markdown" ? (w = r.value) == null ? void 0 : w.getMarkdown() : (C =
|
|
5494
|
+
const b = (g === "markdown" ? (w = r.value) == null ? void 0 : w.getMarkdown() : (C = i.current) == null ? void 0 : C.innerText) || "";
|
|
5475
5495
|
n.controller.copyMessage(b, e);
|
|
5476
5496
|
};
|
|
5477
5497
|
return /* @__PURE__ */ p("div", { className: "".concat(Tt.b(), " ").concat(Tt.is("loading", a)), children: [
|
|
@@ -5514,7 +5534,7 @@ const Tt = new B("markdown-message"), h2 = (n) => {
|
|
|
5514
5534
|
controller: n.controller
|
|
5515
5535
|
}
|
|
5516
5536
|
),
|
|
5517
|
-
/* @__PURE__ */ p("div", {
|
|
5537
|
+
/* @__PURE__ */ p("div", { ref: i })
|
|
5518
5538
|
] }),
|
|
5519
5539
|
/* @__PURE__ */ p("div", { className: Tt.b("footer"), children: [
|
|
5520
5540
|
/* @__PURE__ */ p(
|
|
@@ -5527,7 +5547,7 @@ const Tt = new B("markdown-message"), h2 = (n) => {
|
|
|
5527
5547
|
"".concat(e.messageid, "_").concat(e.islike, "_").concat(e.isdislike)
|
|
5528
5548
|
),
|
|
5529
5549
|
u.value.hasSuggestions || e.chatuiactions && e.chatuiactions.length > 0 ? /* @__PURE__ */ p(
|
|
5530
|
-
|
|
5550
|
+
zg,
|
|
5531
5551
|
{
|
|
5532
5552
|
uiactions: e.chatuiactions || [],
|
|
5533
5553
|
suggestions: u.value.suggestions,
|
|
@@ -6199,13 +6219,13 @@ function sd(n, e, t, i) {
|
|
|
6199
6219
|
} else if (t.content.size)
|
|
6200
6220
|
if (!t.openStart && !t.openEnd && n.depth == i && e.depth == i) {
|
|
6201
6221
|
let o = n.parent, a = o.content;
|
|
6202
|
-
return
|
|
6222
|
+
return Pt(o, a.cut(0, n.parentOffset).append(t.content).append(a.cut(e.parentOffset)));
|
|
6203
6223
|
} else {
|
|
6204
6224
|
let { start: o, end: a } = p2(t, n);
|
|
6205
|
-
return
|
|
6225
|
+
return Pt(s, ad(n, o, a, e, i));
|
|
6206
6226
|
}
|
|
6207
6227
|
else
|
|
6208
|
-
return
|
|
6228
|
+
return Pt(s, Vi(n, e, i));
|
|
6209
6229
|
}
|
|
6210
6230
|
function od(n, e) {
|
|
6211
6231
|
if (!e.type.compatibleContent(n.type))
|
|
@@ -6215,29 +6235,29 @@ function Is(n, e, t) {
|
|
|
6215
6235
|
let i = n.node(t);
|
|
6216
6236
|
return od(i, e.node(t)), i;
|
|
6217
6237
|
}
|
|
6218
|
-
function
|
|
6238
|
+
function Rt(n, e) {
|
|
6219
6239
|
let t = e.length - 1;
|
|
6220
6240
|
t >= 0 && n.isText && n.sameMarkup(e[t]) ? e[t] = n.withText(e[t].text + n.text) : e.push(n);
|
|
6221
6241
|
}
|
|
6222
6242
|
function An(n, e, t, i) {
|
|
6223
6243
|
let r = (e || n).node(t), s = 0, o = e ? e.index(t) : r.childCount;
|
|
6224
|
-
n && (s = n.index(t), n.depth > t ? s++ : n.textOffset && (
|
|
6244
|
+
n && (s = n.index(t), n.depth > t ? s++ : n.textOffset && (Rt(n.nodeAfter, i), s++));
|
|
6225
6245
|
for (let a = s; a < o; a++)
|
|
6226
|
-
|
|
6227
|
-
e && e.depth == t && e.textOffset &&
|
|
6246
|
+
Rt(r.child(a), i);
|
|
6247
|
+
e && e.depth == t && e.textOffset && Rt(e.nodeBefore, i);
|
|
6228
6248
|
}
|
|
6229
|
-
function
|
|
6249
|
+
function Pt(n, e) {
|
|
6230
6250
|
return n.type.checkContent(e), n.copy(e);
|
|
6231
6251
|
}
|
|
6232
6252
|
function ad(n, e, t, i, r) {
|
|
6233
6253
|
let s = n.depth > r && Is(n, e, r + 1), o = i.depth > r && Is(t, i, r + 1), a = [];
|
|
6234
|
-
return An(null, n, r, a), s && o && e.index(r) == t.index(r) ? (od(s, o), Pt(
|
|
6254
|
+
return An(null, n, r, a), s && o && e.index(r) == t.index(r) ? (od(s, o), Rt(Pt(s, ad(n, e, t, i, r + 1)), a)) : (s && Rt(Pt(s, Vi(n, e, r + 1)), a), An(e, t, r, a), o && Rt(Pt(o, Vi(t, i, r + 1)), a)), An(i, null, r, a), new S(a);
|
|
6235
6255
|
}
|
|
6236
6256
|
function Vi(n, e, t) {
|
|
6237
6257
|
let i = [];
|
|
6238
6258
|
if (An(null, n, t, i), n.depth > t) {
|
|
6239
6259
|
let r = Is(n, e, t + 1);
|
|
6240
|
-
Pt(
|
|
6260
|
+
Rt(Pt(r, Vi(n, e, t + 1)), i);
|
|
6241
6261
|
}
|
|
6242
6262
|
return An(e, null, t, i), new S(i);
|
|
6243
6263
|
}
|
|
@@ -7837,9 +7857,9 @@ const vd = {
|
|
|
7837
7857
|
script: !0,
|
|
7838
7858
|
style: !0,
|
|
7839
7859
|
title: !0
|
|
7840
|
-
}, yd = { ol: !0, ul: !0 }, Fn = 1,
|
|
7860
|
+
}, yd = { ol: !0, ul: !0 }, Fn = 1, Rs = 2, Dn = 4;
|
|
7841
7861
|
function ul(n, e, t) {
|
|
7842
|
-
return e != null ? (e ? Fn : 0) | (e === "full" ?
|
|
7862
|
+
return e != null ? (e ? Fn : 0) | (e === "full" ? Rs : 0) : n && n.whitespace == "pre" ? Fn | Rs : t & ~Dn;
|
|
7843
7863
|
}
|
|
7844
7864
|
class vi {
|
|
7845
7865
|
constructor(e, t, i, r, s, o) {
|
|
@@ -7890,7 +7910,7 @@ class dl {
|
|
|
7890
7910
|
e.nodeType == 3 ? this.addTextNode(e, t) : e.nodeType == 1 && this.addElement(e, t);
|
|
7891
7911
|
}
|
|
7892
7912
|
addTextNode(e, t) {
|
|
7893
|
-
let i = e.nodeValue, r = this.top, s = r.options &
|
|
7913
|
+
let i = e.nodeValue, r = this.top, s = r.options & Rs ? "full" : this.localPreserveWS || (r.options & Fn) > 0, { schema: o } = this.parser;
|
|
7894
7914
|
if (s === "full" || r.inlineContext(e) || /[^ \t\r\n\u000c]/.test(i)) {
|
|
7895
7915
|
if (s)
|
|
7896
7916
|
if (s === "full")
|
|
@@ -8306,9 +8326,9 @@ function Wr(n) {
|
|
|
8306
8326
|
const ml = /* @__PURE__ */ new WeakMap();
|
|
8307
8327
|
function $2(n) {
|
|
8308
8328
|
let e = ml.get(n);
|
|
8309
|
-
return e === void 0 && ml.set(n, e =
|
|
8329
|
+
return e === void 0 && ml.set(n, e = R2(n)), e;
|
|
8310
8330
|
}
|
|
8311
|
-
function
|
|
8331
|
+
function R2(n) {
|
|
8312
8332
|
let e = null;
|
|
8313
8333
|
function t(i) {
|
|
8314
8334
|
if (i && typeof i == "object")
|
|
@@ -8365,17 +8385,17 @@ function Ni(n, e, t, i) {
|
|
|
8365
8385
|
return { dom: l, contentDOM: a };
|
|
8366
8386
|
}
|
|
8367
8387
|
const bd = 65535, wd = Math.pow(2, 16);
|
|
8368
|
-
function
|
|
8388
|
+
function P2(n, e) {
|
|
8369
8389
|
return n + e * wd;
|
|
8370
8390
|
}
|
|
8371
8391
|
function gl(n) {
|
|
8372
8392
|
return n & bd;
|
|
8373
8393
|
}
|
|
8374
|
-
function
|
|
8394
|
+
function z2(n) {
|
|
8375
8395
|
return (n - (n & bd)) / wd;
|
|
8376
8396
|
}
|
|
8377
8397
|
const Cd = 1, kd = 2, Ei = 4, xd = 8;
|
|
8378
|
-
class
|
|
8398
|
+
class Ps {
|
|
8379
8399
|
/**
|
|
8380
8400
|
@internal
|
|
8381
8401
|
*/
|
|
@@ -8429,7 +8449,7 @@ class De {
|
|
|
8429
8449
|
if (!this.inverted)
|
|
8430
8450
|
for (let r = 0; r < i; r++)
|
|
8431
8451
|
t += this.ranges[r * 3 + 2] - this.ranges[r * 3 + 1];
|
|
8432
|
-
return this.ranges[i * 3] + t +
|
|
8452
|
+
return this.ranges[i * 3] + t + z2(e);
|
|
8433
8453
|
}
|
|
8434
8454
|
mapResult(e, t = 1) {
|
|
8435
8455
|
return this._map(e, t, !1);
|
|
@@ -8451,12 +8471,12 @@ class De {
|
|
|
8451
8471
|
let h = c ? e == l ? -1 : e == d ? 1 : t : t, f = l + r + (h < 0 ? 0 : u);
|
|
8452
8472
|
if (i)
|
|
8453
8473
|
return f;
|
|
8454
|
-
let m = e == (t < 0 ? l : d) ? null :
|
|
8455
|
-
return (t < 0 ? e != l : e != d) && (v |= xd), new
|
|
8474
|
+
let m = e == (t < 0 ? l : d) ? null : P2(a / 3, e - l), v = e == l ? kd : e == d ? Cd : Ei;
|
|
8475
|
+
return (t < 0 ? e != l : e != d) && (v |= xd), new Ps(f, v, m);
|
|
8456
8476
|
}
|
|
8457
8477
|
r += u - c;
|
|
8458
8478
|
}
|
|
8459
|
-
return i ? e + r : new
|
|
8479
|
+
return i ? e + r : new Ps(e + r, 0, null);
|
|
8460
8480
|
}
|
|
8461
8481
|
/**
|
|
8462
8482
|
@internal
|
|
@@ -8612,7 +8632,7 @@ class Vn {
|
|
|
8612
8632
|
}
|
|
8613
8633
|
r |= a.delInfo, e = a.pos;
|
|
8614
8634
|
}
|
|
8615
|
-
return i ? e : new
|
|
8635
|
+
return i ? e : new Ps(e, r, null);
|
|
8616
8636
|
}
|
|
8617
8637
|
}
|
|
8618
8638
|
const Ur = /* @__PURE__ */ Object.create(null);
|
|
@@ -8870,7 +8890,7 @@ class ae extends Ce {
|
|
|
8870
8890
|
super(), this.from = e, this.to = t, this.slice = i, this.structure = r;
|
|
8871
8891
|
}
|
|
8872
8892
|
apply(e) {
|
|
8873
|
-
return this.structure &&
|
|
8893
|
+
return this.structure && zs(e, this.from, this.to) ? te.fail("Structure replace would overwrite content") : te.fromReplace(e, this.from, this.to, this.slice);
|
|
8874
8894
|
}
|
|
8875
8895
|
getMap() {
|
|
8876
8896
|
return new De([this.from, this.to - this.from, this.slice.size]);
|
|
@@ -8919,7 +8939,7 @@ class ce extends Ce {
|
|
|
8919
8939
|
super(), this.from = e, this.to = t, this.gapFrom = i, this.gapTo = r, this.slice = s, this.insert = o, this.structure = a;
|
|
8920
8940
|
}
|
|
8921
8941
|
apply(e) {
|
|
8922
|
-
if (this.structure && (
|
|
8942
|
+
if (this.structure && (zs(e, this.from, this.gapFrom) || zs(e, this.gapTo, this.to)))
|
|
8923
8943
|
return te.fail("Structure gap-replace would overwrite content");
|
|
8924
8944
|
let t = e.slice(this.gapFrom, this.gapTo);
|
|
8925
8945
|
if (t.openStart || t.openEnd)
|
|
@@ -8966,7 +8986,7 @@ class ce extends Ce {
|
|
|
8966
8986
|
}
|
|
8967
8987
|
}
|
|
8968
8988
|
Ce.jsonID("replaceAround", ce);
|
|
8969
|
-
function
|
|
8989
|
+
function zs(n, e, t) {
|
|
8970
8990
|
let i = n.resolve(e), r = t - e, s = i.depth;
|
|
8971
8991
|
for (; r > 0 && s > 0 && i.indexAfter(s) == i.node(s).childCount; )
|
|
8972
8992
|
s--, r--;
|
|
@@ -8980,7 +9000,7 @@ function Ls(n, e, t) {
|
|
|
8980
9000
|
}
|
|
8981
9001
|
return !1;
|
|
8982
9002
|
}
|
|
8983
|
-
function
|
|
9003
|
+
function L2(n, e, t, i) {
|
|
8984
9004
|
let r = [], s = [], o, a;
|
|
8985
9005
|
n.doc.nodesBetween(e, t, (l, c, u) => {
|
|
8986
9006
|
if (!l.isInline)
|
|
@@ -9838,7 +9858,7 @@ class Dd {
|
|
|
9838
9858
|
Add the given mark to the inline content between `from` and `to`.
|
|
9839
9859
|
*/
|
|
9840
9860
|
addMark(e, t, i) {
|
|
9841
|
-
return
|
|
9861
|
+
return L2(this, e, t, i), this;
|
|
9842
9862
|
}
|
|
9843
9863
|
/**
|
|
9844
9864
|
Remove marks from inline nodes between `from` and `to`. When
|
|
@@ -9860,7 +9880,7 @@ class Dd {
|
|
|
9860
9880
|
}
|
|
9861
9881
|
}
|
|
9862
9882
|
const Jr = /* @__PURE__ */ Object.create(null);
|
|
9863
|
-
class
|
|
9883
|
+
class L {
|
|
9864
9884
|
/**
|
|
9865
9885
|
Initialize a selection with the head and anchor and ranges. If no
|
|
9866
9886
|
ranges are given, constructs a single range across `$anchor` and
|
|
@@ -9954,7 +9974,7 @@ class z {
|
|
|
9954
9974
|
found.
|
|
9955
9975
|
*/
|
|
9956
9976
|
static findFrom(e, t, i = !1) {
|
|
9957
|
-
let r = e.parent.inlineContent ? new
|
|
9977
|
+
let r = e.parent.inlineContent ? new z(e) : tn(e.node(0), e.parent, e.pos, e.index(), t, i);
|
|
9958
9978
|
if (r)
|
|
9959
9979
|
return r;
|
|
9960
9980
|
for (let s = e.depth - 1; s >= 0; s--) {
|
|
@@ -9970,7 +9990,7 @@ class z {
|
|
|
9970
9990
|
negative, it will search backwards first.
|
|
9971
9991
|
*/
|
|
9972
9992
|
static near(e, t = 1) {
|
|
9973
|
-
return this.findFrom(e, t) || this.findFrom(e, -t) || new
|
|
9993
|
+
return this.findFrom(e, t) || this.findFrom(e, -t) || new Pe(e.node(0));
|
|
9974
9994
|
}
|
|
9975
9995
|
/**
|
|
9976
9996
|
Find the cursor or leaf node selection closest to the start of
|
|
@@ -9979,14 +9999,14 @@ class z {
|
|
|
9979
9999
|
exists.
|
|
9980
10000
|
*/
|
|
9981
10001
|
static atStart(e) {
|
|
9982
|
-
return tn(e, e, 0, 0, 1) || new
|
|
10002
|
+
return tn(e, e, 0, 0, 1) || new Pe(e);
|
|
9983
10003
|
}
|
|
9984
10004
|
/**
|
|
9985
10005
|
Find the cursor or leaf node selection closest to the end of the
|
|
9986
10006
|
given document.
|
|
9987
10007
|
*/
|
|
9988
10008
|
static atEnd(e) {
|
|
9989
|
-
return tn(e, e, e.content.size, e.childCount, -1) || new
|
|
10009
|
+
return tn(e, e, e.content.size, e.childCount, -1) || new Pe(e);
|
|
9990
10010
|
}
|
|
9991
10011
|
/**
|
|
9992
10012
|
Deserialize the JSON representation of a selection. Must be
|
|
@@ -10021,10 +10041,10 @@ class z {
|
|
|
10021
10041
|
returns the bookmark for that.
|
|
10022
10042
|
*/
|
|
10023
10043
|
getBookmark() {
|
|
10024
|
-
return
|
|
10044
|
+
return z.between(this.$anchor, this.$head).getBookmark();
|
|
10025
10045
|
}
|
|
10026
10046
|
}
|
|
10027
|
-
|
|
10047
|
+
L.prototype.visible = !0;
|
|
10028
10048
|
class r6 {
|
|
10029
10049
|
/**
|
|
10030
10050
|
Create a range.
|
|
@@ -10037,7 +10057,7 @@ let yl = !1;
|
|
|
10037
10057
|
function bl(n) {
|
|
10038
10058
|
!yl && !n.parent.inlineContent && (yl = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + n.parent.type.name + ")"));
|
|
10039
10059
|
}
|
|
10040
|
-
class
|
|
10060
|
+
class z extends L {
|
|
10041
10061
|
/**
|
|
10042
10062
|
Construct a text selection between the given points.
|
|
10043
10063
|
*/
|
|
@@ -10054,9 +10074,9 @@ class L extends z {
|
|
|
10054
10074
|
map(e, t) {
|
|
10055
10075
|
let i = e.resolve(t.map(this.head));
|
|
10056
10076
|
if (!i.parent.inlineContent)
|
|
10057
|
-
return
|
|
10077
|
+
return L.near(i);
|
|
10058
10078
|
let r = e.resolve(t.map(this.anchor));
|
|
10059
|
-
return new
|
|
10079
|
+
return new z(r.parent.inlineContent ? r : i, i);
|
|
10060
10080
|
}
|
|
10061
10081
|
replace(e, t = _.empty) {
|
|
10062
10082
|
if (super.replace(e, t), t == _.empty) {
|
|
@@ -10065,7 +10085,7 @@ class L extends z {
|
|
|
10065
10085
|
}
|
|
10066
10086
|
}
|
|
10067
10087
|
eq(e) {
|
|
10068
|
-
return e instanceof
|
|
10088
|
+
return e instanceof z && e.anchor == this.anchor && e.head == this.head;
|
|
10069
10089
|
}
|
|
10070
10090
|
getBookmark() {
|
|
10071
10091
|
return new ur(this.anchor, this.head);
|
|
@@ -10079,7 +10099,7 @@ class L extends z {
|
|
|
10079
10099
|
static fromJSON(e, t) {
|
|
10080
10100
|
if (typeof t.anchor != "number" || typeof t.head != "number")
|
|
10081
10101
|
throw new RangeError("Invalid input for TextSelection.fromJSON");
|
|
10082
|
-
return new
|
|
10102
|
+
return new z(e.resolve(t.anchor), e.resolve(t.head));
|
|
10083
10103
|
}
|
|
10084
10104
|
/**
|
|
10085
10105
|
Create a text selection from non-resolved positions.
|
|
@@ -10099,16 +10119,16 @@ class L extends z {
|
|
|
10099
10119
|
static between(e, t, i) {
|
|
10100
10120
|
let r = e.pos - t.pos;
|
|
10101
10121
|
if ((!i || r) && (i = r >= 0 ? 1 : -1), !t.parent.inlineContent) {
|
|
10102
|
-
let s =
|
|
10122
|
+
let s = L.findFrom(t, i, !0) || L.findFrom(t, -i, !0);
|
|
10103
10123
|
if (s)
|
|
10104
10124
|
t = s.$head;
|
|
10105
10125
|
else
|
|
10106
|
-
return
|
|
10126
|
+
return L.near(t, i);
|
|
10107
10127
|
}
|
|
10108
|
-
return e.parent.inlineContent || (r == 0 ? e = t : (e = (
|
|
10128
|
+
return e.parent.inlineContent || (r == 0 ? e = t : (e = (L.findFrom(e, -i, !0) || L.findFrom(e, i, !0)).$anchor, e.pos < t.pos != r < 0 && (e = t))), new z(e, t);
|
|
10109
10129
|
}
|
|
10110
10130
|
}
|
|
10111
|
-
|
|
10131
|
+
L.jsonID("text", z);
|
|
10112
10132
|
class ur {
|
|
10113
10133
|
constructor(e, t) {
|
|
10114
10134
|
this.anchor = e, this.head = t;
|
|
@@ -10117,10 +10137,10 @@ class ur {
|
|
|
10117
10137
|
return new ur(e.map(this.anchor), e.map(this.head));
|
|
10118
10138
|
}
|
|
10119
10139
|
resolve(e) {
|
|
10120
|
-
return
|
|
10140
|
+
return z.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
10121
10141
|
}
|
|
10122
10142
|
}
|
|
10123
|
-
class D extends
|
|
10143
|
+
class D extends L {
|
|
10124
10144
|
/**
|
|
10125
10145
|
Create a node selection. Does not verify the validity of its
|
|
10126
10146
|
argument.
|
|
@@ -10131,7 +10151,7 @@ class D extends z {
|
|
|
10131
10151
|
}
|
|
10132
10152
|
map(e, t) {
|
|
10133
10153
|
let { deleted: i, pos: r } = t.mapResult(this.anchor), s = e.resolve(r);
|
|
10134
|
-
return i ?
|
|
10154
|
+
return i ? L.near(s) : new D(s);
|
|
10135
10155
|
}
|
|
10136
10156
|
content() {
|
|
10137
10157
|
return new _(S.from(this.node), 0, 0);
|
|
@@ -10168,7 +10188,7 @@ class D extends z {
|
|
|
10168
10188
|
}
|
|
10169
10189
|
}
|
|
10170
10190
|
D.prototype.visible = !1;
|
|
10171
|
-
|
|
10191
|
+
L.jsonID("node", D);
|
|
10172
10192
|
class Mo {
|
|
10173
10193
|
constructor(e) {
|
|
10174
10194
|
this.anchor = e;
|
|
@@ -10179,10 +10199,10 @@ class Mo {
|
|
|
10179
10199
|
}
|
|
10180
10200
|
resolve(e) {
|
|
10181
10201
|
let t = e.resolve(this.anchor), i = t.nodeAfter;
|
|
10182
|
-
return i && D.isSelectable(i) ? new D(t) :
|
|
10202
|
+
return i && D.isSelectable(i) ? new D(t) : L.near(t);
|
|
10183
10203
|
}
|
|
10184
10204
|
}
|
|
10185
|
-
class
|
|
10205
|
+
class Pe extends L {
|
|
10186
10206
|
/**
|
|
10187
10207
|
Create an all-selection over the given document.
|
|
10188
10208
|
*/
|
|
@@ -10192,7 +10212,7 @@ class Re extends z {
|
|
|
10192
10212
|
replace(e, t = _.empty) {
|
|
10193
10213
|
if (t == _.empty) {
|
|
10194
10214
|
e.delete(0, e.doc.content.size);
|
|
10195
|
-
let i =
|
|
10215
|
+
let i = L.atStart(e.doc);
|
|
10196
10216
|
i.eq(e.selection) || e.setSelection(i);
|
|
10197
10217
|
} else
|
|
10198
10218
|
super.replace(e, t);
|
|
@@ -10204,30 +10224,30 @@ class Re extends z {
|
|
|
10204
10224
|
@internal
|
|
10205
10225
|
*/
|
|
10206
10226
|
static fromJSON(e) {
|
|
10207
|
-
return new
|
|
10227
|
+
return new Pe(e);
|
|
10208
10228
|
}
|
|
10209
10229
|
map(e) {
|
|
10210
|
-
return new
|
|
10230
|
+
return new Pe(e);
|
|
10211
10231
|
}
|
|
10212
10232
|
eq(e) {
|
|
10213
|
-
return e instanceof
|
|
10233
|
+
return e instanceof Pe;
|
|
10214
10234
|
}
|
|
10215
10235
|
getBookmark() {
|
|
10216
10236
|
return s6;
|
|
10217
10237
|
}
|
|
10218
10238
|
}
|
|
10219
|
-
|
|
10239
|
+
L.jsonID("all", Pe);
|
|
10220
10240
|
const s6 = {
|
|
10221
10241
|
map() {
|
|
10222
10242
|
return this;
|
|
10223
10243
|
},
|
|
10224
10244
|
resolve(n) {
|
|
10225
|
-
return new
|
|
10245
|
+
return new Pe(n);
|
|
10226
10246
|
}
|
|
10227
10247
|
};
|
|
10228
10248
|
function tn(n, e, t, i, r, s = !1) {
|
|
10229
10249
|
if (e.inlineContent)
|
|
10230
|
-
return
|
|
10250
|
+
return z.create(n, t);
|
|
10231
10251
|
for (let o = i - (r > 0 ? 0 : 1); r > 0 ? o < e.childCount : o >= 0; o += r) {
|
|
10232
10252
|
let a = e.child(o);
|
|
10233
10253
|
if (a.isAtom) {
|
|
@@ -10252,7 +10272,7 @@ function wl(n, e, t) {
|
|
|
10252
10272
|
let s = n.mapping.maps[i], o;
|
|
10253
10273
|
s.forEach((a, l, c, u) => {
|
|
10254
10274
|
o == null && (o = u);
|
|
10255
|
-
}), n.setSelection(
|
|
10275
|
+
}), n.setSelection(L.near(n.doc.resolve(o), t));
|
|
10256
10276
|
}
|
|
10257
10277
|
const Cl = 1, yi = 2, kl = 4;
|
|
10258
10278
|
class o6 extends Dd {
|
|
@@ -10367,7 +10387,7 @@ class o6 extends Dd {
|
|
|
10367
10387
|
let o = this.doc.resolve(t);
|
|
10368
10388
|
s = i == t ? o.marks() : o.marksAcross(this.doc.resolve(i));
|
|
10369
10389
|
}
|
|
10370
|
-
return this.replaceRangeWith(t, i, r.text(e, s)), !this.selection.empty && this.selection.to == t + e.length && this.setSelection(
|
|
10390
|
+
return this.replaceRangeWith(t, i, r.text(e, s)), !this.selection.empty && this.selection.to == t + e.length && this.setSelection(L.near(this.selection.$to)), this;
|
|
10371
10391
|
}
|
|
10372
10392
|
}
|
|
10373
10393
|
/**
|
|
@@ -10425,7 +10445,7 @@ const a6 = [
|
|
|
10425
10445
|
}),
|
|
10426
10446
|
new Nn("selection", {
|
|
10427
10447
|
init(n, e) {
|
|
10428
|
-
return n.selection ||
|
|
10448
|
+
return n.selection || L.atStart(e.doc);
|
|
10429
10449
|
},
|
|
10430
10450
|
apply(n) {
|
|
10431
10451
|
return n.selection;
|
|
@@ -10605,7 +10625,7 @@ class on {
|
|
|
10605
10625
|
if (o.name == "doc")
|
|
10606
10626
|
s.doc = gt.fromJSON(e.schema, t.doc);
|
|
10607
10627
|
else if (o.name == "selection")
|
|
10608
|
-
s.selection =
|
|
10628
|
+
s.selection = L.fromJSON(s.doc, t.selection);
|
|
10609
10629
|
else if (o.name == "storedMarks")
|
|
10610
10630
|
t.storedMarks && (s.storedMarks = t.storedMarks.map(e.schema.markFromJSON));
|
|
10611
10631
|
else {
|
|
@@ -10634,7 +10654,7 @@ class ne {
|
|
|
10634
10654
|
Create a plugin.
|
|
10635
10655
|
*/
|
|
10636
10656
|
constructor(e) {
|
|
10637
|
-
this.spec = e, this.props = {}, e.props && $d(e.props, this, this.props), this.key = e.key ? e.key.key :
|
|
10657
|
+
this.spec = e, this.props = {}, e.props && $d(e.props, this, this.props), this.key = e.key ? e.key.key : Rd("plugin");
|
|
10638
10658
|
}
|
|
10639
10659
|
/**
|
|
10640
10660
|
Extract the plugin's state field from an editor state.
|
|
@@ -10644,7 +10664,7 @@ class ne {
|
|
|
10644
10664
|
}
|
|
10645
10665
|
}
|
|
10646
10666
|
const Xr = /* @__PURE__ */ Object.create(null);
|
|
10647
|
-
function
|
|
10667
|
+
function Rd(n) {
|
|
10648
10668
|
return n in Xr ? n + "$" + ++Xr[n] : (Xr[n] = 0, n + "$");
|
|
10649
10669
|
}
|
|
10650
10670
|
class ge {
|
|
@@ -10652,7 +10672,7 @@ class ge {
|
|
|
10652
10672
|
Create a plugin key.
|
|
10653
10673
|
*/
|
|
10654
10674
|
constructor(e = "key") {
|
|
10655
|
-
this.key =
|
|
10675
|
+
this.key = Rd(e);
|
|
10656
10676
|
}
|
|
10657
10677
|
/**
|
|
10658
10678
|
Get the active plugin with this key, if any, from an editor
|
|
@@ -10669,12 +10689,12 @@ class ge {
|
|
|
10669
10689
|
}
|
|
10670
10690
|
}
|
|
10671
10691
|
const l6 = (n, e) => n.selection.empty ? !1 : (e && e(n.tr.deleteSelection().scrollIntoView()), !0);
|
|
10672
|
-
function
|
|
10692
|
+
function Pd(n, e) {
|
|
10673
10693
|
let { $cursor: t } = n.selection;
|
|
10674
10694
|
return !t || (e ? !e.endOfTextblock("backward", n) : t.parentOffset > 0) ? null : t;
|
|
10675
10695
|
}
|
|
10676
10696
|
const c6 = (n, e, t) => {
|
|
10677
|
-
let i =
|
|
10697
|
+
let i = Pd(n, t);
|
|
10678
10698
|
if (!i)
|
|
10679
10699
|
return !1;
|
|
10680
10700
|
let r = _o(i);
|
|
@@ -10691,7 +10711,7 @@ const c6 = (n, e, t) => {
|
|
|
10691
10711
|
if (a && a.slice.size < a.to - a.from) {
|
|
10692
10712
|
if (e) {
|
|
10693
10713
|
let l = n.tr.step(a);
|
|
10694
|
-
l.setSelection(mn(s, "end") ?
|
|
10714
|
+
l.setSelection(mn(s, "end") ? L.findFrom(l.doc.resolve(l.mapping.map(r.pos, -1)), -1) : D.create(l.doc, r.pos - s.nodeSize)), e(l.scrollIntoView());
|
|
10695
10715
|
}
|
|
10696
10716
|
return !0;
|
|
10697
10717
|
}
|
|
@@ -10700,19 +10720,19 @@ const c6 = (n, e, t) => {
|
|
|
10700
10720
|
}
|
|
10701
10721
|
return s.isAtom && r.depth == i.depth - 1 ? (e && e(n.tr.delete(r.pos - s.nodeSize, r.pos).scrollIntoView()), !0) : !1;
|
|
10702
10722
|
}, u6 = (n, e, t) => {
|
|
10703
|
-
let i =
|
|
10723
|
+
let i = Pd(n, t);
|
|
10704
10724
|
if (!i)
|
|
10705
10725
|
return !1;
|
|
10706
10726
|
let r = _o(i);
|
|
10707
|
-
return r ?
|
|
10727
|
+
return r ? zd(n, r, e) : !1;
|
|
10708
10728
|
}, d6 = (n, e, t) => {
|
|
10709
|
-
let i =
|
|
10729
|
+
let i = Ld(n, t);
|
|
10710
10730
|
if (!i)
|
|
10711
10731
|
return !1;
|
|
10712
10732
|
let r = No(i);
|
|
10713
|
-
return r ?
|
|
10733
|
+
return r ? zd(n, r, e) : !1;
|
|
10714
10734
|
};
|
|
10715
|
-
function
|
|
10735
|
+
function zd(n, e, t) {
|
|
10716
10736
|
let i = e.nodeBefore, r = i, s = e.pos - 1;
|
|
10717
10737
|
for (; !r.isTextblock; s--) {
|
|
10718
10738
|
if (r.type.spec.isolating)
|
|
@@ -10736,7 +10756,7 @@ function Ld(n, e, t) {
|
|
|
10736
10756
|
return !1;
|
|
10737
10757
|
if (t) {
|
|
10738
10758
|
let u = n.tr.step(c);
|
|
10739
|
-
u.setSelection(
|
|
10759
|
+
u.setSelection(z.create(u.doc, s)), t(u.scrollIntoView());
|
|
10740
10760
|
}
|
|
10741
10761
|
return !0;
|
|
10742
10762
|
}
|
|
@@ -10771,12 +10791,12 @@ function _o(n) {
|
|
|
10771
10791
|
}
|
|
10772
10792
|
return null;
|
|
10773
10793
|
}
|
|
10774
|
-
function
|
|
10794
|
+
function Ld(n, e) {
|
|
10775
10795
|
let { $cursor: t } = n.selection;
|
|
10776
10796
|
return !t || (e ? !e.endOfTextblock("forward", n) : t.parentOffset < t.parent.content.size) ? null : t;
|
|
10777
10797
|
}
|
|
10778
10798
|
const f6 = (n, e, t) => {
|
|
10779
|
-
let i =
|
|
10799
|
+
let i = Ld(n, t);
|
|
10780
10800
|
if (!i)
|
|
10781
10801
|
return !1;
|
|
10782
10802
|
let r = No(i);
|
|
@@ -10790,7 +10810,7 @@ const f6 = (n, e, t) => {
|
|
|
10790
10810
|
if (o && o.slice.size < o.to - o.from) {
|
|
10791
10811
|
if (e) {
|
|
10792
10812
|
let a = n.tr.step(o);
|
|
10793
|
-
a.setSelection(mn(s, "start") ?
|
|
10813
|
+
a.setSelection(mn(s, "start") ? L.findFrom(a.doc.resolve(a.mapping.map(r.pos)), 1) : D.create(a.doc, a.mapping.map(r.pos))), e(a.scrollIntoView());
|
|
10794
10814
|
}
|
|
10795
10815
|
return !0;
|
|
10796
10816
|
}
|
|
@@ -10865,19 +10885,19 @@ const b6 = (n, e) => {
|
|
|
10865
10885
|
return !1;
|
|
10866
10886
|
if (e) {
|
|
10867
10887
|
let a = t.after(), l = n.tr.replaceWith(a, a, o.createAndFill());
|
|
10868
|
-
l.setSelection(
|
|
10888
|
+
l.setSelection(L.near(l.doc.resolve(a), 1)), e(l.scrollIntoView());
|
|
10869
10889
|
}
|
|
10870
10890
|
return !0;
|
|
10871
10891
|
}, w6 = (n, e) => {
|
|
10872
10892
|
let t = n.selection, { $from: i, $to: r } = t;
|
|
10873
|
-
if (t instanceof
|
|
10893
|
+
if (t instanceof Pe || i.parent.inlineContent || r.parent.inlineContent)
|
|
10874
10894
|
return !1;
|
|
10875
10895
|
let s = Bd(r.parent.contentMatchAt(r.indexAfter()));
|
|
10876
10896
|
if (!s || !s.isTextblock)
|
|
10877
10897
|
return !1;
|
|
10878
10898
|
if (e) {
|
|
10879
10899
|
let o = (!i.parentOffset && r.index() < r.parent.childCount ? i : r).pos, a = n.tr.insert(o, s.createAndFill());
|
|
10880
|
-
a.setSelection(
|
|
10900
|
+
a.setSelection(z.create(a.doc, o + 1)), e(a.scrollIntoView());
|
|
10881
10901
|
}
|
|
10882
10902
|
return !0;
|
|
10883
10903
|
}, C6 = (n, e) => {
|
|
@@ -10915,7 +10935,7 @@ function Fd(n, e, t, i) {
|
|
|
10915
10935
|
}
|
|
10916
10936
|
return !0;
|
|
10917
10937
|
}
|
|
10918
|
-
let u = s.type.spec.isolating || i > 0 && l ? null :
|
|
10938
|
+
let u = s.type.spec.isolating || i > 0 && l ? null : L.findFrom(e, 1), d = u && u.$from.blockRange(u.$to), h = d && xn(d);
|
|
10919
10939
|
if (h != null && h >= e.depth)
|
|
10920
10940
|
return t && t(n.tr.lift(d, h).scrollIntoView()), !0;
|
|
10921
10941
|
if (c && mn(s, "start", !0) && mn(r, "end")) {
|
|
@@ -10946,7 +10966,7 @@ function Vd(n) {
|
|
|
10946
10966
|
return !1;
|
|
10947
10967
|
s--;
|
|
10948
10968
|
}
|
|
10949
|
-
return r.node(s).isTextblock ? (t && t(e.tr.setSelection(
|
|
10969
|
+
return r.node(s).isTextblock ? (t && t(e.tr.setSelection(z.create(e.doc, n < 0 ? r.start(s) : r.end(s)))), !0) : !1;
|
|
10950
10970
|
};
|
|
10951
10971
|
}
|
|
10952
10972
|
const S6 = Vd(-1), T6 = Vd(1);
|
|
@@ -11075,22 +11095,22 @@ const fe = function(n) {
|
|
|
11075
11095
|
let e = n.assignedSlot || n.parentNode;
|
|
11076
11096
|
return e && e.nodeType == 11 ? e.host : e;
|
|
11077
11097
|
};
|
|
11078
|
-
let
|
|
11098
|
+
let Ls = null;
|
|
11079
11099
|
const tt = function(n, e, t) {
|
|
11080
|
-
let i =
|
|
11100
|
+
let i = Ls || (Ls = document.createRange());
|
|
11081
11101
|
return i.setEnd(n, t == null ? n.nodeValue.length : t), i.setStart(n, e || 0), i;
|
|
11082
11102
|
}, $6 = function() {
|
|
11083
|
-
|
|
11103
|
+
Ls = null;
|
|
11084
11104
|
}, jt = function(n, e, t, i) {
|
|
11085
11105
|
return t && (Tl(n, e, t, i, -1) || Tl(n, e, t, i, 1));
|
|
11086
|
-
},
|
|
11106
|
+
}, R6 = /^(img|br|input|textarea|hr)$/i;
|
|
11087
11107
|
function Tl(n, e, t, i, r) {
|
|
11088
11108
|
for (var s; ; ) {
|
|
11089
11109
|
if (n == t && e == i)
|
|
11090
11110
|
return !0;
|
|
11091
|
-
if (e == (r < 0 ? 0 :
|
|
11111
|
+
if (e == (r < 0 ? 0 : Re(n))) {
|
|
11092
11112
|
let o = n.parentNode;
|
|
11093
|
-
if (!o || o.nodeType != 1 || Zn(n) ||
|
|
11113
|
+
if (!o || o.nodeType != 1 || Zn(n) || R6.test(n.nodeName) || n.contentEditable == "false")
|
|
11094
11114
|
return !1;
|
|
11095
11115
|
e = fe(n) + (r < 0 ? 0 : 1), n = o;
|
|
11096
11116
|
} else if (n.nodeType == 1) {
|
|
@@ -11101,29 +11121,29 @@ function Tl(n, e, t, i, r) {
|
|
|
11101
11121
|
else
|
|
11102
11122
|
return !1;
|
|
11103
11123
|
else
|
|
11104
|
-
n = o, e = r < 0 ?
|
|
11124
|
+
n = o, e = r < 0 ? Re(n) : 0;
|
|
11105
11125
|
} else
|
|
11106
11126
|
return !1;
|
|
11107
11127
|
}
|
|
11108
11128
|
}
|
|
11109
|
-
function
|
|
11129
|
+
function Re(n) {
|
|
11110
11130
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
11111
11131
|
}
|
|
11112
|
-
function
|
|
11132
|
+
function P6(n, e) {
|
|
11113
11133
|
for (; ; ) {
|
|
11114
11134
|
if (n.nodeType == 3 && e)
|
|
11115
11135
|
return n;
|
|
11116
11136
|
if (n.nodeType == 1 && e > 0) {
|
|
11117
11137
|
if (n.contentEditable == "false")
|
|
11118
11138
|
return null;
|
|
11119
|
-
n = n.childNodes[e - 1], e =
|
|
11139
|
+
n = n.childNodes[e - 1], e = Re(n);
|
|
11120
11140
|
} else if (n.parentNode && !Zn(n))
|
|
11121
11141
|
e = fe(n), n = n.parentNode;
|
|
11122
11142
|
else
|
|
11123
11143
|
return null;
|
|
11124
11144
|
}
|
|
11125
11145
|
}
|
|
11126
|
-
function
|
|
11146
|
+
function z6(n, e) {
|
|
11127
11147
|
for (; ; ) {
|
|
11128
11148
|
if (n.nodeType == 3 && e < n.nodeValue.length)
|
|
11129
11149
|
return n;
|
|
@@ -11137,14 +11157,14 @@ function L6(n, e) {
|
|
|
11137
11157
|
return null;
|
|
11138
11158
|
}
|
|
11139
11159
|
}
|
|
11140
|
-
function
|
|
11141
|
-
for (let i = e == 0, r = e ==
|
|
11160
|
+
function L6(n, e, t) {
|
|
11161
|
+
for (let i = e == 0, r = e == Re(n); i || r; ) {
|
|
11142
11162
|
if (n == t)
|
|
11143
11163
|
return !0;
|
|
11144
11164
|
let s = fe(n);
|
|
11145
11165
|
if (n = n.parentNode, !n)
|
|
11146
11166
|
return !1;
|
|
11147
|
-
i = i && s == 0, r = r && s ==
|
|
11167
|
+
i = i && s == 0, r = r && s == Re(n);
|
|
11148
11168
|
}
|
|
11149
11169
|
}
|
|
11150
11170
|
function Zn(n) {
|
|
@@ -11171,18 +11191,18 @@ function F6(n, e, t) {
|
|
|
11171
11191
|
try {
|
|
11172
11192
|
let i = n.caretPositionFromPoint(e, t);
|
|
11173
11193
|
if (i)
|
|
11174
|
-
return { node: i.offsetNode, offset: Math.min(
|
|
11194
|
+
return { node: i.offsetNode, offset: Math.min(Re(i.offsetNode), i.offset) };
|
|
11175
11195
|
} catch (i) {
|
|
11176
11196
|
}
|
|
11177
11197
|
if (n.caretRangeFromPoint) {
|
|
11178
11198
|
let i = n.caretRangeFromPoint(e, t);
|
|
11179
11199
|
if (i)
|
|
11180
|
-
return { node: i.startContainer, offset: Math.min(
|
|
11200
|
+
return { node: i.startContainer, offset: Math.min(Re(i.startContainer), i.startOffset) };
|
|
11181
11201
|
}
|
|
11182
11202
|
}
|
|
11183
|
-
const Ye = typeof navigator < "u" ? navigator : null, Ml = typeof document < "u" ? document : null, xt = Ye && Ye.userAgent || "", Bs = /Edge\/(\d+)/.exec(xt), Hd = /MSIE \d/.exec(xt), Fs = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xt),
|
|
11184
|
-
|
|
11185
|
-
const Vs = !
|
|
11203
|
+
const Ye = typeof navigator < "u" ? navigator : null, Ml = typeof document < "u" ? document : null, xt = Ye && Ye.userAgent || "", Bs = /Edge\/(\d+)/.exec(xt), Hd = /MSIE \d/.exec(xt), Fs = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xt), Ne = !!(Hd || Fs || Bs), vt = Hd ? document.documentMode : Fs ? +Fs[1] : Bs ? +Bs[1] : 0, ze = !Ne && /gecko\/(\d+)/i.test(xt);
|
|
11204
|
+
ze && +(/Firefox\/(\d+)/.exec(xt) || [0, 0])[1];
|
|
11205
|
+
const Vs = !Ne && /Chrome\/(\d+)/.exec(xt), le = !!Vs, jd = Vs ? +Vs[1] : 0, we = !Ne && !!Ye && /Apple Computer/.test(Ye.vendor), vn = we && (/Mobile\/\w+/.test(xt) || !!Ye && Ye.maxTouchPoints > 2), $e = vn || (Ye ? /Mac/.test(Ye.platform) : !1), Wd = Ye ? /Win/.test(Ye.platform) : !1, it = /Android \d/.test(xt), Qn = !!Ml && "webkitFontSmoothing" in Ml.documentElement.style, V6 = Qn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
11186
11206
|
function H6(n) {
|
|
11187
11207
|
let e = n.defaultView && n.defaultView.visualViewport;
|
|
11188
11208
|
return e ? {
|
|
@@ -11375,7 +11395,7 @@ function Y6(n, e) {
|
|
|
11375
11395
|
for (let c = o; i && c; c = gn(c))
|
|
11376
11396
|
c.draggable && (i = void 0);
|
|
11377
11397
|
if (o = J6(o, e), i) {
|
|
11378
|
-
if (
|
|
11398
|
+
if (ze && i.nodeType == 1 && (r = Math.min(r, i.childNodes.length), r < i.childNodes.length)) {
|
|
11379
11399
|
let u = i.childNodes[r], d;
|
|
11380
11400
|
u.nodeName == "IMG" && (d = u.getBoundingClientRect()).right <= e.left && d.bottom > e.top && r++;
|
|
11381
11401
|
}
|
|
@@ -11400,11 +11420,11 @@ function ct(n, e) {
|
|
|
11400
11420
|
}
|
|
11401
11421
|
const Z6 = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
|
|
11402
11422
|
function Gd(n, e, t) {
|
|
11403
|
-
let { node: i, offset: r, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = Qn ||
|
|
11423
|
+
let { node: i, offset: r, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = Qn || ze;
|
|
11404
11424
|
if (i.nodeType == 3)
|
|
11405
11425
|
if (o && (Z6.test(i.nodeValue) || (t < 0 ? !r : r == i.nodeValue.length))) {
|
|
11406
11426
|
let l = ct(tt(i, r, r), t);
|
|
11407
|
-
if (
|
|
11427
|
+
if (ze && r && /\s/.test(i.nodeValue[r - 1]) && r < i.nodeValue.length) {
|
|
11408
11428
|
let c = ct(tt(i, r - 1, r - 1), -1);
|
|
11409
11429
|
if (c.top == l.top) {
|
|
11410
11430
|
let u = ct(tt(i, r, r + 1), -1);
|
|
@@ -11418,24 +11438,24 @@ function Gd(n, e, t) {
|
|
|
11418
11438
|
return t < 0 && !r ? (c++, u = -1) : t >= 0 && r == i.nodeValue.length ? (l--, u = 1) : t < 0 ? l-- : c++, Tn(ct(tt(i, l, c), u), u < 0);
|
|
11419
11439
|
}
|
|
11420
11440
|
if (!n.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
|
|
11421
|
-
if (s == null && r && (t < 0 || r ==
|
|
11441
|
+
if (s == null && r && (t < 0 || r == Re(i))) {
|
|
11422
11442
|
let l = i.childNodes[r - 1];
|
|
11423
11443
|
if (l.nodeType == 1)
|
|
11424
11444
|
return Yr(l.getBoundingClientRect(), !1);
|
|
11425
11445
|
}
|
|
11426
|
-
if (s == null && r <
|
|
11446
|
+
if (s == null && r < Re(i)) {
|
|
11427
11447
|
let l = i.childNodes[r];
|
|
11428
11448
|
if (l.nodeType == 1)
|
|
11429
11449
|
return Yr(l.getBoundingClientRect(), !0);
|
|
11430
11450
|
}
|
|
11431
11451
|
return Yr(i.getBoundingClientRect(), t >= 0);
|
|
11432
11452
|
}
|
|
11433
|
-
if (s == null && r && (t < 0 || r ==
|
|
11434
|
-
let l = i.childNodes[r - 1], c = l.nodeType == 3 ? tt(l,
|
|
11453
|
+
if (s == null && r && (t < 0 || r == Re(i))) {
|
|
11454
|
+
let l = i.childNodes[r - 1], c = l.nodeType == 3 ? tt(l, Re(l) - (o ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
|
|
11435
11455
|
if (c)
|
|
11436
11456
|
return Tn(ct(c, 1), !1);
|
|
11437
11457
|
}
|
|
11438
|
-
if (s == null && r <
|
|
11458
|
+
if (s == null && r < Re(i)) {
|
|
11439
11459
|
let l = i.childNodes[r];
|
|
11440
11460
|
for (; l.pmViewDesc && l.pmViewDesc.ignoreForCoords; )
|
|
11441
11461
|
l = l.nextSibling;
|
|
@@ -11519,10 +11539,10 @@ let El = null, Ol = null, Al = !1;
|
|
|
11519
11539
|
function n3(n, e, t) {
|
|
11520
11540
|
return El == e && Ol == t ? Al : (El = e, Ol = t, Al = t == "up" || t == "down" ? Q6(n, e, t) : t3(n, e, t));
|
|
11521
11541
|
}
|
|
11522
|
-
const
|
|
11542
|
+
const Le = 0, Il = 1, It = 2, Ze = 3;
|
|
11523
11543
|
class ei {
|
|
11524
11544
|
constructor(e, t, i, r) {
|
|
11525
|
-
this.parent = e, this.children = t, this.dom = i, this.contentDOM = r, this.dirty =
|
|
11545
|
+
this.parent = e, this.children = t, this.dom = i, this.contentDOM = r, this.dirty = Le, i.pmViewDesc = this;
|
|
11526
11546
|
}
|
|
11527
11547
|
// Used to check whether a given description corresponds to a
|
|
11528
11548
|
// widget/mark/node.
|
|
@@ -11779,7 +11799,7 @@ class ei {
|
|
|
11779
11799
|
m = y;
|
|
11780
11800
|
}
|
|
11781
11801
|
let a = this.domFromPos(e, e ? -1 : 1), l = t == e ? a : this.domFromPos(t, t ? -1 : 1), c = i.root.getSelection(), u = i.domSelectionRange(), d = !1;
|
|
11782
|
-
if ((
|
|
11802
|
+
if ((ze || we) && e == t) {
|
|
11783
11803
|
let { node: f, offset: m } = a;
|
|
11784
11804
|
if (f.nodeType == 3) {
|
|
11785
11805
|
if (d = !!(m && f.nodeValue[m - 1] == "\n"), d && m == f.nodeValue.length)
|
|
@@ -11797,14 +11817,14 @@ class ei {
|
|
|
11797
11817
|
d = v && (v.nodeName == "BR" || v.contentEditable == "false");
|
|
11798
11818
|
}
|
|
11799
11819
|
}
|
|
11800
|
-
if (
|
|
11820
|
+
if (ze && u.focusNode && u.focusNode != l.node && u.focusNode.nodeType == 1) {
|
|
11801
11821
|
let f = u.focusNode.childNodes[u.focusOffset];
|
|
11802
11822
|
f && f.contentEditable == "false" && (r = !0);
|
|
11803
11823
|
}
|
|
11804
11824
|
if (!(r || d && we) && jt(a.node, a.offset, u.anchorNode, u.anchorOffset) && jt(l.node, l.offset, u.focusNode, u.focusOffset))
|
|
11805
11825
|
return;
|
|
11806
11826
|
let h = !1;
|
|
11807
|
-
if ((c.extend || e == t) && !(d &&
|
|
11827
|
+
if ((c.extend || e == t) && !(d && ze)) {
|
|
11808
11828
|
c.collapse(a.node, a.offset);
|
|
11809
11829
|
try {
|
|
11810
11830
|
e != t && c.extend(l.node, l.offset), h = !0;
|
|
@@ -11881,7 +11901,7 @@ class Yd extends ei {
|
|
|
11881
11901
|
super(e, [], o, null), this.widget = t, this.widget = t, s = this;
|
|
11882
11902
|
}
|
|
11883
11903
|
matchesWidget(e) {
|
|
11884
|
-
return this.dirty ==
|
|
11904
|
+
return this.dirty == Le && e.type.eq(this.widget.type);
|
|
11885
11905
|
}
|
|
11886
11906
|
parseRule() {
|
|
11887
11907
|
return { ignore: !0 };
|
|
@@ -11938,11 +11958,11 @@ class Wt extends ei {
|
|
|
11938
11958
|
return this.dirty != Ze && this.mark.eq(e);
|
|
11939
11959
|
}
|
|
11940
11960
|
markDirty(e, t) {
|
|
11941
|
-
if (super.markDirty(e, t), this.dirty !=
|
|
11961
|
+
if (super.markDirty(e, t), this.dirty != Le) {
|
|
11942
11962
|
let i = this.parent;
|
|
11943
11963
|
for (; !i.node; )
|
|
11944
11964
|
i = i.parent;
|
|
11945
|
-
i.dirty < this.dirty && (i.dirty = this.dirty), this.dirty =
|
|
11965
|
+
i.dirty < this.dirty && (i.dirty = this.dirty), this.dirty = Le;
|
|
11946
11966
|
}
|
|
11947
11967
|
}
|
|
11948
11968
|
slice(e, t, i) {
|
|
@@ -12011,7 +12031,7 @@ class yt extends ei {
|
|
|
12011
12031
|
return e;
|
|
12012
12032
|
}
|
|
12013
12033
|
matchesNode(e, t, i) {
|
|
12014
|
-
return this.dirty ==
|
|
12034
|
+
return this.dirty == Le && e.eq(this.node) && Wi(t, this.outerDeco) && i.eq(this.innerDeco);
|
|
12015
12035
|
}
|
|
12016
12036
|
get size() {
|
|
12017
12037
|
return this.node.nodeSize;
|
|
@@ -12035,7 +12055,7 @@ class yt extends ei {
|
|
|
12035
12055
|
}
|
|
12036
12056
|
localCompositionInfo(e, t) {
|
|
12037
12057
|
let { from: i, to: r } = e.state.selection;
|
|
12038
|
-
if (!(e.state.selection instanceof
|
|
12058
|
+
if (!(e.state.selection instanceof z) || i < t || r > t + this.node.content.size)
|
|
12039
12059
|
return null;
|
|
12040
12060
|
let s = e.input.compositionNode;
|
|
12041
12061
|
if (!s || !this.dom.contains(s.parentNode))
|
|
@@ -12066,7 +12086,7 @@ class yt extends ei {
|
|
|
12066
12086
|
return this.dirty == Ze || !e.sameMarkup(this.node) ? !1 : (this.updateInner(e, t, i, r), !0);
|
|
12067
12087
|
}
|
|
12068
12088
|
updateInner(e, t, i, r) {
|
|
12069
|
-
this.updateOuterDeco(t), this.node = e, this.innerDeco = i, this.contentDOM && this.updateChildren(r, this.posAtStart), this.dirty =
|
|
12089
|
+
this.updateOuterDeco(t), this.node = e, this.innerDeco = i, this.contentDOM && this.updateChildren(r, this.posAtStart), this.dirty = Le;
|
|
12070
12090
|
}
|
|
12071
12091
|
updateOuterDeco(e) {
|
|
12072
12092
|
if (Wi(e, this.outerDeco))
|
|
@@ -12102,7 +12122,7 @@ class hr extends yt {
|
|
|
12102
12122
|
return { skip: e || !0 };
|
|
12103
12123
|
}
|
|
12104
12124
|
update(e, t, i, r) {
|
|
12105
|
-
return this.dirty == Ze || this.dirty !=
|
|
12125
|
+
return this.dirty == Ze || this.dirty != Le && !this.inParent() || !e.sameMarkup(this.node) ? !1 : (this.updateOuterDeco(t), (this.dirty != Le || e.text != this.node.text) && e.text != this.nodeDOM.nodeValue && (this.nodeDOM.nodeValue = e.text, r.trackWrites == this.nodeDOM && (r.trackWrites = null)), this.node = e, this.dirty = Le, !0);
|
|
12106
12126
|
}
|
|
12107
12127
|
inParent() {
|
|
12108
12128
|
let e = this.parent.contentDOM;
|
|
@@ -12139,7 +12159,7 @@ class Zd extends ei {
|
|
|
12139
12159
|
return { ignore: !0 };
|
|
12140
12160
|
}
|
|
12141
12161
|
matchesHack(e) {
|
|
12142
|
-
return this.dirty ==
|
|
12162
|
+
return this.dirty == Le && this.dom.nodeName == e;
|
|
12143
12163
|
}
|
|
12144
12164
|
get domAtom() {
|
|
12145
12165
|
return !0;
|
|
@@ -12298,7 +12318,7 @@ class o3 {
|
|
|
12298
12318
|
for (; r < o && (r == s - 1 ? this.top : this.stack[r + 1 << 1]).matchesMark(e[r]) && e[r].type.spec.spanning !== !1; )
|
|
12299
12319
|
r++;
|
|
12300
12320
|
for (; r < s; )
|
|
12301
|
-
this.destroyRest(), this.top.dirty =
|
|
12321
|
+
this.destroyRest(), this.top.dirty = Le, this.index = this.stack.pop(), this.top = this.stack.pop(), s--;
|
|
12302
12322
|
for (; s < e.length; ) {
|
|
12303
12323
|
this.stack.push(this.top, this.index + 1);
|
|
12304
12324
|
let a = -1;
|
|
@@ -12368,7 +12388,7 @@ class o3 {
|
|
|
12368
12388
|
if (!h && l.update(e, t, i, r))
|
|
12369
12389
|
return this.destroyBetween(this.index, a), l.dom != u && (this.changed = !0), this.index++, !0;
|
|
12370
12390
|
if (!h && (d = this.recreateWrapper(l, e, t, i, r, o)))
|
|
12371
|
-
return this.destroyBetween(this.index, a), this.top.children[this.index] = d, d.contentDOM && (d.dirty = It, d.updateChildren(r, o + 1), d.dirty =
|
|
12391
|
+
return this.destroyBetween(this.index, a), this.top.children[this.index] = d, d.contentDOM && (d.dirty = It, d.updateChildren(r, o + 1), d.dirty = Le), this.changed = !0, this.index++, !0;
|
|
12372
12392
|
break;
|
|
12373
12393
|
}
|
|
12374
12394
|
}
|
|
@@ -12553,7 +12573,7 @@ function Oo(n, e = null) {
|
|
|
12553
12573
|
for (l = o; r && !r.node; )
|
|
12554
12574
|
r = r.parent;
|
|
12555
12575
|
let d = r.node;
|
|
12556
|
-
if (r && d.isAtom && D.isSelectable(d) && r.parent && !(d.isInline &&
|
|
12576
|
+
if (r && d.isAtom && D.isSelectable(d) && r.parent && !(d.isInline && L6(t.focusNode, t.focusOffset, r.dom))) {
|
|
12557
12577
|
let h = r.posBefore;
|
|
12558
12578
|
c = new D(o == h ? a : i.resolve(h));
|
|
12559
12579
|
}
|
|
@@ -12596,13 +12616,13 @@ function st(n, e = !1) {
|
|
|
12596
12616
|
f3(n);
|
|
12597
12617
|
else {
|
|
12598
12618
|
let { anchor: i, head: r } = t, s, o;
|
|
12599
|
-
|
|
12619
|
+
Rl && !(t instanceof z) && (t.$from.parent.inlineContent || (s = Pl(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = Pl(n, t.to))), n.docView.setSelection(i, r, n, e), Rl && (s && zl(s), o && zl(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && h3(n));
|
|
12600
12620
|
}
|
|
12601
12621
|
n.domObserver.setCurSelection(), n.domObserver.connectSelection();
|
|
12602
12622
|
}
|
|
12603
12623
|
}
|
|
12604
|
-
const
|
|
12605
|
-
function
|
|
12624
|
+
const Rl = we || le && jd < 63;
|
|
12625
|
+
function Pl(n, e) {
|
|
12606
12626
|
let { node: t, offset: i } = n.docView.domFromPos(e, 0), r = i < t.childNodes.length ? t.childNodes[i] : null, s = i ? t.childNodes[i - 1] : null;
|
|
12607
12627
|
if (we && r && r.contentEditable == "false")
|
|
12608
12628
|
return Zr(r);
|
|
@@ -12616,7 +12636,7 @@ function Rl(n, e) {
|
|
|
12616
12636
|
function Zr(n) {
|
|
12617
12637
|
return n.contentEditable = "true", we && n.draggable && (n.draggable = !1, n.wasDraggable = !0), n;
|
|
12618
12638
|
}
|
|
12619
|
-
function
|
|
12639
|
+
function zl(n) {
|
|
12620
12640
|
n.contentEditable = "false", n.wasDraggable && (n.draggable = !0, n.wasDraggable = null);
|
|
12621
12641
|
}
|
|
12622
12642
|
function h3(n) {
|
|
@@ -12634,20 +12654,20 @@ function f3(n) {
|
|
|
12634
12654
|
if (!e)
|
|
12635
12655
|
return;
|
|
12636
12656
|
let t = n.cursorWrapper.dom, i = t.nodeName == "IMG";
|
|
12637
|
-
i ? e.collapse(t.parentNode, fe(t) + 1) : e.collapse(t, 0), !i && !n.state.selection.visible &&
|
|
12657
|
+
i ? e.collapse(t.parentNode, fe(t) + 1) : e.collapse(t, 0), !i && !n.state.selection.visible && Ne && vt <= 11 && (t.disabled = !0, t.disabled = !1);
|
|
12638
12658
|
}
|
|
12639
12659
|
function ih(n, e) {
|
|
12640
12660
|
if (e instanceof D) {
|
|
12641
12661
|
let t = n.docView.descAt(e.from);
|
|
12642
|
-
t != n.lastSelectedViewDesc && (
|
|
12662
|
+
t != n.lastSelectedViewDesc && (Ll(n), t && t.selectNode(), n.lastSelectedViewDesc = t);
|
|
12643
12663
|
} else
|
|
12644
|
-
|
|
12664
|
+
Ll(n);
|
|
12645
12665
|
}
|
|
12646
|
-
function
|
|
12666
|
+
function Ll(n) {
|
|
12647
12667
|
n.lastSelectedViewDesc && (n.lastSelectedViewDesc.parent && n.lastSelectedViewDesc.deselectNode(), n.lastSelectedViewDesc = void 0);
|
|
12648
12668
|
}
|
|
12649
12669
|
function Ao(n, e, t, i) {
|
|
12650
|
-
return n.someProp("createSelectionBetween", (r) => r(n, e, t)) ||
|
|
12670
|
+
return n.someProp("createSelectionBetween", (r) => r(n, e, t)) || z.between(e, t, i);
|
|
12651
12671
|
}
|
|
12652
12672
|
function Bl(n) {
|
|
12653
12673
|
return n.editable && !n.hasFocus() ? !1 : rh(n);
|
|
@@ -12668,20 +12688,20 @@ function p3(n) {
|
|
|
12668
12688
|
}
|
|
12669
12689
|
function Ws(n, e) {
|
|
12670
12690
|
let { $anchor: t, $head: i } = n.selection, r = e > 0 ? t.max(i) : t.min(i), s = r.parent.inlineContent ? r.depth ? n.doc.resolve(e > 0 ? r.after() : r.before()) : null : r;
|
|
12671
|
-
return s &&
|
|
12691
|
+
return s && L.findFrom(s, e);
|
|
12672
12692
|
}
|
|
12673
12693
|
function ut(n, e) {
|
|
12674
12694
|
return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()), !0;
|
|
12675
12695
|
}
|
|
12676
12696
|
function Fl(n, e, t) {
|
|
12677
12697
|
let i = n.state.selection;
|
|
12678
|
-
if (i instanceof
|
|
12698
|
+
if (i instanceof z)
|
|
12679
12699
|
if (t.indexOf("s") > -1) {
|
|
12680
12700
|
let { $head: r } = i, s = r.textOffset ? null : e < 0 ? r.nodeBefore : r.nodeAfter;
|
|
12681
12701
|
if (!s || s.isText || !s.isLeaf)
|
|
12682
12702
|
return !1;
|
|
12683
12703
|
let o = n.state.doc.resolve(r.pos + s.nodeSize * (e < 0 ? -1 : 1));
|
|
12684
|
-
return ut(n, new
|
|
12704
|
+
return ut(n, new z(i.$anchor, o));
|
|
12685
12705
|
} else if (i.empty) {
|
|
12686
12706
|
if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
|
|
12687
12707
|
let r = Ws(n.state, e);
|
|
@@ -12691,13 +12711,13 @@ function Fl(n, e, t) {
|
|
|
12691
12711
|
if (!s || s.isText)
|
|
12692
12712
|
return !1;
|
|
12693
12713
|
let a = e < 0 ? r.pos - s.nodeSize : r.pos;
|
|
12694
|
-
return s.isAtom || (o = n.docView.descAt(a)) && !o.contentDOM ? D.isSelectable(s) ? ut(n, new D(e < 0 ? n.state.doc.resolve(r.pos - s.nodeSize) : r)) : Qn ? ut(n, new
|
|
12714
|
+
return s.isAtom || (o = n.docView.descAt(a)) && !o.contentDOM ? D.isSelectable(s) ? ut(n, new D(e < 0 ? n.state.doc.resolve(r.pos - s.nodeSize) : r)) : Qn ? ut(n, new z(n.state.doc.resolve(e < 0 ? a : a + s.nodeSize))) : !1 : !1;
|
|
12695
12715
|
}
|
|
12696
12716
|
} else
|
|
12697
12717
|
return !1;
|
|
12698
12718
|
else {
|
|
12699
12719
|
if (i instanceof D && i.node.isInline)
|
|
12700
|
-
return ut(n, new
|
|
12720
|
+
return ut(n, new z(e > 0 ? i.$to : i.$from));
|
|
12701
12721
|
{
|
|
12702
12722
|
let r = Ws(n.state, e);
|
|
12703
12723
|
return r ? ut(n, r) : !1;
|
|
@@ -12707,7 +12727,7 @@ function Fl(n, e, t) {
|
|
|
12707
12727
|
function Ui(n) {
|
|
12708
12728
|
return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
|
|
12709
12729
|
}
|
|
12710
|
-
function
|
|
12730
|
+
function Rn(n, e) {
|
|
12711
12731
|
let t = n.pmViewDesc;
|
|
12712
12732
|
return t && t.size == 0 && (e < 0 || n.nextSibling || n.nodeName != "BR");
|
|
12713
12733
|
}
|
|
@@ -12719,13 +12739,13 @@ function m3(n) {
|
|
|
12719
12739
|
if (!t)
|
|
12720
12740
|
return;
|
|
12721
12741
|
let r, s, o = !1;
|
|
12722
|
-
for (
|
|
12742
|
+
for (ze && t.nodeType == 1 && i < Ui(t) && Rn(t.childNodes[i], -1) && (o = !0); ; )
|
|
12723
12743
|
if (i > 0) {
|
|
12724
12744
|
if (t.nodeType != 1)
|
|
12725
12745
|
break;
|
|
12726
12746
|
{
|
|
12727
12747
|
let a = t.childNodes[i - 1];
|
|
12728
|
-
if (
|
|
12748
|
+
if (Rn(a, -1))
|
|
12729
12749
|
r = t, s = --i;
|
|
12730
12750
|
else if (a.nodeType == 3)
|
|
12731
12751
|
t = a, i = t.nodeValue.length;
|
|
@@ -12737,7 +12757,7 @@ function m3(n) {
|
|
|
12737
12757
|
break;
|
|
12738
12758
|
{
|
|
12739
12759
|
let a = t.previousSibling;
|
|
12740
|
-
for (; a &&
|
|
12760
|
+
for (; a && Rn(a, -1); )
|
|
12741
12761
|
r = t.parentNode, s = fe(a), a = a.previousSibling;
|
|
12742
12762
|
if (a)
|
|
12743
12763
|
t = a, i = Ui(t);
|
|
@@ -12760,7 +12780,7 @@ function g3(n) {
|
|
|
12760
12780
|
if (t.nodeType != 1)
|
|
12761
12781
|
break;
|
|
12762
12782
|
let a = t.childNodes[i];
|
|
12763
|
-
if (
|
|
12783
|
+
if (Rn(a, 1))
|
|
12764
12784
|
s = t, o = ++i;
|
|
12765
12785
|
else
|
|
12766
12786
|
break;
|
|
@@ -12769,7 +12789,7 @@ function g3(n) {
|
|
|
12769
12789
|
break;
|
|
12770
12790
|
{
|
|
12771
12791
|
let a = t.nextSibling;
|
|
12772
|
-
for (; a &&
|
|
12792
|
+
for (; a && Rn(a, 1); )
|
|
12773
12793
|
s = a.parentNode, o = fe(a) + 1, a = a.nextSibling;
|
|
12774
12794
|
if (a)
|
|
12775
12795
|
t = a, i = 0, r = Ui(t);
|
|
@@ -12848,7 +12868,7 @@ function Vl(n, e) {
|
|
|
12848
12868
|
}
|
|
12849
12869
|
function Hl(n, e, t) {
|
|
12850
12870
|
let i = n.state.selection;
|
|
12851
|
-
if (i instanceof
|
|
12871
|
+
if (i instanceof z && !i.empty || t.indexOf("s") > -1 || $e && t.indexOf("m") > -1)
|
|
12852
12872
|
return !1;
|
|
12853
12873
|
let { $from: r, $to: s } = i;
|
|
12854
12874
|
if (!r.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
|
|
@@ -12857,13 +12877,13 @@ function Hl(n, e, t) {
|
|
|
12857
12877
|
return ut(n, o);
|
|
12858
12878
|
}
|
|
12859
12879
|
if (!r.parent.inlineContent) {
|
|
12860
|
-
let o = e < 0 ? r : s, a = i instanceof
|
|
12880
|
+
let o = e < 0 ? r : s, a = i instanceof Pe ? L.near(o, e) : L.findFrom(o, e);
|
|
12861
12881
|
return a ? ut(n, a) : !1;
|
|
12862
12882
|
}
|
|
12863
12883
|
return !1;
|
|
12864
12884
|
}
|
|
12865
12885
|
function jl(n, e) {
|
|
12866
|
-
if (!(n.state.selection instanceof
|
|
12886
|
+
if (!(n.state.selection instanceof z))
|
|
12867
12887
|
return !0;
|
|
12868
12888
|
let { $head: t, $anchor: i, empty: r } = n.state.selection;
|
|
12869
12889
|
if (!t.sameParent(i))
|
|
@@ -13179,7 +13199,7 @@ Me.keypress = (n, e) => {
|
|
|
13179
13199
|
return;
|
|
13180
13200
|
}
|
|
13181
13201
|
let i = n.state.selection;
|
|
13182
|
-
if (!(i instanceof
|
|
13202
|
+
if (!(i instanceof z) || !i.$from.sameParent(i.$to)) {
|
|
13183
13203
|
let r = String.fromCharCode(t.charCode), s = () => n.state.tr.insertText(r).scrollIntoView();
|
|
13184
13204
|
!/[\r\n]/.test(r) && !n.someProp("handleTextInput", (o) => o(n, i.$from.pos, i.$to.pos, r, s)) && n.dispatch(s()), t.preventDefault();
|
|
13185
13205
|
}
|
|
@@ -13206,13 +13226,13 @@ function dn(n, e, t) {
|
|
|
13206
13226
|
let i = n.state.tr.setSelection(e);
|
|
13207
13227
|
t == "pointer" && i.setMeta("pointer", !0), n.dispatch(i);
|
|
13208
13228
|
}
|
|
13209
|
-
function
|
|
13229
|
+
function R3(n, e) {
|
|
13210
13230
|
if (e == -1)
|
|
13211
13231
|
return !1;
|
|
13212
13232
|
let t = n.state.doc.resolve(e), i = t.nodeAfter;
|
|
13213
13233
|
return i && i.isAtom && D.isSelectable(i) ? (dn(n, new D(t), "pointer"), !0) : !1;
|
|
13214
13234
|
}
|
|
13215
|
-
function
|
|
13235
|
+
function P3(n, e) {
|
|
13216
13236
|
if (e == -1)
|
|
13217
13237
|
return !1;
|
|
13218
13238
|
let t = n.state.selection, i, r;
|
|
@@ -13227,10 +13247,10 @@ function R3(n, e) {
|
|
|
13227
13247
|
}
|
|
13228
13248
|
return r != null ? (dn(n, D.create(n.state.doc, r), "pointer"), !0) : !1;
|
|
13229
13249
|
}
|
|
13230
|
-
function
|
|
13231
|
-
return $o(n, "handleClickOn", e, t, i) || n.someProp("handleClick", (s) => s(n, e, i)) || (r ?
|
|
13250
|
+
function z3(n, e, t, i, r) {
|
|
13251
|
+
return $o(n, "handleClickOn", e, t, i) || n.someProp("handleClick", (s) => s(n, e, i)) || (r ? P3(n, t) : R3(n, t));
|
|
13232
13252
|
}
|
|
13233
|
-
function
|
|
13253
|
+
function L3(n, e, t, i) {
|
|
13234
13254
|
return $o(n, "handleDoubleClickOn", e, t, i) || n.someProp("handleDoubleClick", (r) => r(n, e, i));
|
|
13235
13255
|
}
|
|
13236
13256
|
function B3(n, e, t, i) {
|
|
@@ -13241,12 +13261,12 @@ function F3(n, e, t) {
|
|
|
13241
13261
|
return !1;
|
|
13242
13262
|
let i = n.state.doc;
|
|
13243
13263
|
if (e == -1)
|
|
13244
|
-
return i.inlineContent ? (dn(n,
|
|
13264
|
+
return i.inlineContent ? (dn(n, z.create(i, 0, i.content.size), "pointer"), !0) : !1;
|
|
13245
13265
|
let r = i.resolve(e);
|
|
13246
13266
|
for (let s = r.depth + 1; s > 0; s--) {
|
|
13247
13267
|
let o = s > r.depth ? r.nodeAfter : r.node(s), a = r.before(s);
|
|
13248
13268
|
if (o.inlineContent)
|
|
13249
|
-
dn(n,
|
|
13269
|
+
dn(n, z.create(i, a + 1, a + 1 + o.content.size), "pointer");
|
|
13250
13270
|
else if (D.isSelectable(o))
|
|
13251
13271
|
dn(n, D.create(i, a), "pointer");
|
|
13252
13272
|
else
|
|
@@ -13254,17 +13274,17 @@ function F3(n, e, t) {
|
|
|
13254
13274
|
return !0;
|
|
13255
13275
|
}
|
|
13256
13276
|
}
|
|
13257
|
-
function
|
|
13277
|
+
function Ro(n) {
|
|
13258
13278
|
return qi(n);
|
|
13259
13279
|
}
|
|
13260
13280
|
const hh = $e ? "metaKey" : "ctrlKey";
|
|
13261
13281
|
Te.mousedown = (n, e) => {
|
|
13262
13282
|
let t = e;
|
|
13263
13283
|
n.input.shiftKey = t.shiftKey;
|
|
13264
|
-
let i =
|
|
13284
|
+
let i = Ro(n), r = Date.now(), s = "singleClick";
|
|
13265
13285
|
r - n.input.lastClick.time < 500 && $3(t, n.input.lastClick) && !t[hh] && n.input.lastClick.button == t.button && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: r, x: t.clientX, y: t.clientY, type: s, button: t.button };
|
|
13266
13286
|
let o = n.posAtCoords(fr(t));
|
|
13267
|
-
o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new V3(n, o, t, !!i)) : (s == "doubleClick" ?
|
|
13287
|
+
o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new V3(n, o, t, !!i)) : (s == "doubleClick" ? L3 : B3)(n, o.pos, o.inside, t) ? t.preventDefault() : mt(n, "pointer"));
|
|
13268
13288
|
};
|
|
13269
13289
|
class V3 {
|
|
13270
13290
|
constructor(e, t, i, r) {
|
|
@@ -13283,7 +13303,7 @@ class V3 {
|
|
|
13283
13303
|
node: s,
|
|
13284
13304
|
pos: o,
|
|
13285
13305
|
addAttr: !!(this.target && !this.target.draggable),
|
|
13286
|
-
setUneditable: !!(this.target &&
|
|
13306
|
+
setUneditable: !!(this.target && ze && !this.target.hasAttribute("contentEditable"))
|
|
13287
13307
|
}), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
|
|
13288
13308
|
this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
|
|
13289
13309
|
}, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), mt(e, "pointer");
|
|
@@ -13295,7 +13315,7 @@ class V3 {
|
|
|
13295
13315
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
13296
13316
|
return;
|
|
13297
13317
|
let t = this.pos;
|
|
13298
|
-
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(fr(e))), this.updateAllowDefault(e), this.allowDefault || !t ? mt(this.view, "pointer") :
|
|
13318
|
+
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(fr(e))), this.updateAllowDefault(e), this.allowDefault || !t ? mt(this.view, "pointer") : z3(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
13299
13319
|
we && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
13300
13320
|
// cursor, but still report that the node is selected
|
|
13301
13321
|
// when asked through getSelection. You'll then get a
|
|
@@ -13303,7 +13323,7 @@ class V3 {
|
|
|
13303
13323
|
// (hidden) cursor is doesn't change the selection, and
|
|
13304
13324
|
// thus doesn't get a reaction from ProseMirror. This
|
|
13305
13325
|
// works around that.
|
|
13306
|
-
le && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (dn(this.view,
|
|
13326
|
+
le && !this.view.state.selection.visible && Math.min(Math.abs(t.pos - this.view.state.selection.from), Math.abs(t.pos - this.view.state.selection.to)) <= 2) ? (dn(this.view, L.near(this.view.state.doc.resolve(t.pos)), "pointer"), e.preventDefault()) : mt(this.view, "pointer");
|
|
13307
13327
|
}
|
|
13308
13328
|
move(e) {
|
|
13309
13329
|
this.updateAllowDefault(e), mt(this.view, "pointer"), e.buttons == 0 && this.done();
|
|
@@ -13313,12 +13333,12 @@ class V3 {
|
|
|
13313
13333
|
}
|
|
13314
13334
|
}
|
|
13315
13335
|
Te.touchstart = (n) => {
|
|
13316
|
-
n.input.lastTouch = Date.now(),
|
|
13336
|
+
n.input.lastTouch = Date.now(), Ro(n), mt(n, "pointer");
|
|
13317
13337
|
};
|
|
13318
13338
|
Te.touchmove = (n) => {
|
|
13319
13339
|
n.input.lastTouch = Date.now(), mt(n, "pointer");
|
|
13320
13340
|
};
|
|
13321
|
-
Te.contextmenu = (n) =>
|
|
13341
|
+
Te.contextmenu = (n) => Ro(n);
|
|
13322
13342
|
function fh(n, e) {
|
|
13323
13343
|
return n.composing ? !0 : we && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
|
|
13324
13344
|
}
|
|
@@ -13327,9 +13347,9 @@ Me.compositionstart = Me.compositionupdate = (n) => {
|
|
|
13327
13347
|
if (!n.composing) {
|
|
13328
13348
|
n.domObserver.flush();
|
|
13329
13349
|
let { state: e } = n, t = e.selection.$to;
|
|
13330
|
-
if (e.selection instanceof
|
|
13350
|
+
if (e.selection instanceof z && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((i) => i.type.spec.inclusive === !1) || le && Wd && j3(n)))
|
|
13331
13351
|
n.markCursor = n.state.storedMarks || t.marks(), qi(n, !0), n.markCursor = null;
|
|
13332
|
-
else if (qi(n, !e.selection.empty),
|
|
13352
|
+
else if (qi(n, !e.selection.empty), ze && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
|
|
13333
13353
|
let i = n.domSelectionRange();
|
|
13334
13354
|
for (let r = i.focusNode, s = i.focusOffset; r && r.nodeType == 1 && s != 0; ) {
|
|
13335
13355
|
let o = s < 0 ? r.lastChild : r.childNodes[s - 1];
|
|
@@ -13368,7 +13388,7 @@ function W3(n) {
|
|
|
13368
13388
|
let e = n.domSelectionRange();
|
|
13369
13389
|
if (!e.focusNode)
|
|
13370
13390
|
return null;
|
|
13371
|
-
let t =
|
|
13391
|
+
let t = P6(e.focusNode, e.focusOffset), i = z6(e.focusNode, e.focusOffset);
|
|
13372
13392
|
if (t && i && t != i) {
|
|
13373
13393
|
let r = i.pmViewDesc, s = n.domObserver.lastChangedTextNode;
|
|
13374
13394
|
if (t == s || i == s)
|
|
@@ -13406,7 +13426,7 @@ function q3(n, e) {
|
|
|
13406
13426
|
t.parentNode && t.parentNode.removeChild(t), n.focus();
|
|
13407
13427
|
}, 50);
|
|
13408
13428
|
}
|
|
13409
|
-
const jn =
|
|
13429
|
+
const jn = Ne && vt < 15 || vn && V6 < 604;
|
|
13410
13430
|
Te.copy = Me.cut = (n, e) => {
|
|
13411
13431
|
let t = e, i = n.state.selection, r = t.type == "cut";
|
|
13412
13432
|
if (i.empty)
|
|
@@ -13563,7 +13583,7 @@ function Un(n, e) {
|
|
|
13563
13583
|
}
|
|
13564
13584
|
class Ki {
|
|
13565
13585
|
constructor(e, t) {
|
|
13566
|
-
this.toDOM = e, this.spec = t ||
|
|
13586
|
+
this.toDOM = e, this.spec = t || zt, this.side = this.spec.side || 0;
|
|
13567
13587
|
}
|
|
13568
13588
|
map(e, t, i, r) {
|
|
13569
13589
|
let { pos: s, deleted: o } = e.mapResult(t.from + r, this.side < 0 ? -1 : 1);
|
|
@@ -13581,7 +13601,7 @@ class Ki {
|
|
|
13581
13601
|
}
|
|
13582
13602
|
class bt {
|
|
13583
13603
|
constructor(e, t) {
|
|
13584
|
-
this.attrs = e, this.spec = t ||
|
|
13604
|
+
this.attrs = e, this.spec = t || zt;
|
|
13585
13605
|
}
|
|
13586
13606
|
map(e, t, i, r) {
|
|
13587
13607
|
let s = e.map(t.from + r, this.spec.inclusiveStart ? -1 : 1) - i, o = e.map(t.to + r, this.spec.inclusiveEnd ? 1 : -1) - i;
|
|
@@ -13599,9 +13619,9 @@ class bt {
|
|
|
13599
13619
|
destroy() {
|
|
13600
13620
|
}
|
|
13601
13621
|
}
|
|
13602
|
-
class
|
|
13622
|
+
class Po {
|
|
13603
13623
|
constructor(e, t) {
|
|
13604
|
-
this.attrs = e, this.spec = t ||
|
|
13624
|
+
this.attrs = e, this.spec = t || zt;
|
|
13605
13625
|
}
|
|
13606
13626
|
map(e, t, i, r) {
|
|
13607
13627
|
let s = e.mapResult(t.from + r, 1);
|
|
@@ -13615,7 +13635,7 @@ class Ro {
|
|
|
13615
13635
|
return r == t.from && !(s = e.child(i)).isText && r + s.nodeSize == t.to;
|
|
13616
13636
|
}
|
|
13617
13637
|
eq(e) {
|
|
13618
|
-
return this == e || e instanceof
|
|
13638
|
+
return this == e || e instanceof Po && Un(this.attrs, e.attrs) && Un(this.spec, e.spec);
|
|
13619
13639
|
}
|
|
13620
13640
|
destroy() {
|
|
13621
13641
|
}
|
|
@@ -13669,7 +13689,7 @@ class Se {
|
|
|
13669
13689
|
node, will receive the given attributes.
|
|
13670
13690
|
*/
|
|
13671
13691
|
static node(e, t, i, r) {
|
|
13672
|
-
return new Se(e, t, new
|
|
13692
|
+
return new Se(e, t, new Po(i, r));
|
|
13673
13693
|
}
|
|
13674
13694
|
/**
|
|
13675
13695
|
The spec provided when creating this decoration. Can be useful
|
|
@@ -13691,7 +13711,7 @@ class Se {
|
|
|
13691
13711
|
return this.type instanceof Ki;
|
|
13692
13712
|
}
|
|
13693
13713
|
}
|
|
13694
|
-
const nn = [],
|
|
13714
|
+
const nn = [], zt = {};
|
|
13695
13715
|
class X {
|
|
13696
13716
|
/**
|
|
13697
13717
|
@internal
|
|
@@ -13705,7 +13725,7 @@ class X {
|
|
|
13705
13725
|
you must make a copy if you want need to preserve that.
|
|
13706
13726
|
*/
|
|
13707
13727
|
static create(e, t) {
|
|
13708
|
-
return t.length ? Ji(t, e, 0,
|
|
13728
|
+
return t.length ? Ji(t, e, 0, zt) : ye;
|
|
13709
13729
|
}
|
|
13710
13730
|
/**
|
|
13711
13731
|
Find all decorations in this set which touch the given range
|
|
@@ -13735,7 +13755,7 @@ class X {
|
|
|
13735
13755
|
document.
|
|
13736
13756
|
*/
|
|
13737
13757
|
map(e, t, i) {
|
|
13738
|
-
return this == ye || e.maps.length == 0 ? this : this.mapInner(e, t, 0, 0, i ||
|
|
13758
|
+
return this == ye || e.maps.length == 0 ? this : this.mapInner(e, t, 0, 0, i || zt);
|
|
13739
13759
|
}
|
|
13740
13760
|
/**
|
|
13741
13761
|
@internal
|
|
@@ -13746,7 +13766,7 @@ class X {
|
|
|
13746
13766
|
let l = this.local[a].map(e, i, r);
|
|
13747
13767
|
l && l.type.valid(t, l) ? (o || (o = [])).push(l) : s.onRemove && s.onRemove(this.local[a].spec);
|
|
13748
13768
|
}
|
|
13749
|
-
return this.children.length ? Y3(this.children, o || [], e, t, i, r, s) : o ? new X(o.sort(
|
|
13769
|
+
return this.children.length ? Y3(this.children, o || [], e, t, i, r, s) : o ? new X(o.sort(Lt), nn) : ye;
|
|
13750
13770
|
}
|
|
13751
13771
|
/**
|
|
13752
13772
|
Add the given array of decorations to the ones in the set,
|
|
@@ -13764,13 +13784,13 @@ class X {
|
|
|
13764
13784
|
if (u = wh(t, a, c)) {
|
|
13765
13785
|
for (r || (r = this.children.slice()); s < r.length && r[s] < l; )
|
|
13766
13786
|
s += 3;
|
|
13767
|
-
r[s] == l ? r[s + 2] = r[s + 2].addInner(a, u, c + 1) : r.splice(s, 0, l, l + a.nodeSize, Ji(u, a, c + 1,
|
|
13787
|
+
r[s] == l ? r[s + 2] = r[s + 2].addInner(a, u, c + 1) : r.splice(s, 0, l, l + a.nodeSize, Ji(u, a, c + 1, zt)), s += 3;
|
|
13768
13788
|
}
|
|
13769
13789
|
});
|
|
13770
13790
|
let o = bh(s ? Ch(t) : t, -i);
|
|
13771
13791
|
for (let a = 0; a < o.length; a++)
|
|
13772
13792
|
o[a].type.valid(e, o[a]) || o.splice(a--, 1);
|
|
13773
|
-
return new X(o.length ? this.local.concat(o).sort(
|
|
13793
|
+
return new X(o.length ? this.local.concat(o).sort(Lt) : this.local, r || this.children);
|
|
13774
13794
|
}
|
|
13775
13795
|
/**
|
|
13776
13796
|
Create a new set that contains the decorations in this set, minus
|
|
@@ -13819,7 +13839,7 @@ class X {
|
|
|
13819
13839
|
}
|
|
13820
13840
|
}
|
|
13821
13841
|
if (r) {
|
|
13822
|
-
let a = new X(r.sort(
|
|
13842
|
+
let a = new X(r.sort(Lt), nn);
|
|
13823
13843
|
return i ? new ht([a, i]) : a;
|
|
13824
13844
|
}
|
|
13825
13845
|
return i || ye;
|
|
@@ -13844,7 +13864,7 @@ class X {
|
|
|
13844
13864
|
@internal
|
|
13845
13865
|
*/
|
|
13846
13866
|
locals(e) {
|
|
13847
|
-
return
|
|
13867
|
+
return zo(this.localsInner(e));
|
|
13848
13868
|
}
|
|
13849
13869
|
/**
|
|
13850
13870
|
@internal
|
|
@@ -13864,14 +13884,14 @@ class X {
|
|
|
13864
13884
|
}
|
|
13865
13885
|
}
|
|
13866
13886
|
X.empty = new X([], []);
|
|
13867
|
-
X.removeOverlap =
|
|
13887
|
+
X.removeOverlap = zo;
|
|
13868
13888
|
const ye = X.empty;
|
|
13869
13889
|
class ht {
|
|
13870
13890
|
constructor(e) {
|
|
13871
13891
|
this.members = e;
|
|
13872
13892
|
}
|
|
13873
13893
|
map(e, t) {
|
|
13874
|
-
const i = this.members.map((r) => r.map(e, t,
|
|
13894
|
+
const i = this.members.map((r) => r.map(e, t, zt));
|
|
13875
13895
|
return ht.from(i);
|
|
13876
13896
|
}
|
|
13877
13897
|
forChild(e, t) {
|
|
@@ -13905,7 +13925,7 @@ class ht {
|
|
|
13905
13925
|
t.push(s[o]);
|
|
13906
13926
|
}
|
|
13907
13927
|
}
|
|
13908
|
-
return t ?
|
|
13928
|
+
return t ? zo(i ? t : t.sort(Lt)) : nn;
|
|
13909
13929
|
}
|
|
13910
13930
|
// Create a group for the given array of decoration sets, or return
|
|
13911
13931
|
// a single set when possible.
|
|
@@ -13971,7 +13991,7 @@ function Y3(n, e, t, i, r, s, o) {
|
|
|
13971
13991
|
a.splice(h, 0, u.children[d], u.children[d + 1], u.children[d + 2]);
|
|
13972
13992
|
}
|
|
13973
13993
|
}
|
|
13974
|
-
return new X(e.sort(
|
|
13994
|
+
return new X(e.sort(Lt), a);
|
|
13975
13995
|
}
|
|
13976
13996
|
function bh(n, e) {
|
|
13977
13997
|
if (!e || !n.length)
|
|
@@ -14020,15 +14040,15 @@ function Ji(n, e, t, i) {
|
|
|
14020
14040
|
u != ye && r.push(l, l + a.nodeSize, u);
|
|
14021
14041
|
}
|
|
14022
14042
|
});
|
|
14023
|
-
let o = bh(s ? Ch(n) : n, -t).sort(
|
|
14043
|
+
let o = bh(s ? Ch(n) : n, -t).sort(Lt);
|
|
14024
14044
|
for (let a = 0; a < o.length; a++)
|
|
14025
14045
|
o[a].type.valid(e, o[a]) || (i.onRemove && i.onRemove(o[a].spec), o.splice(a--, 1));
|
|
14026
14046
|
return o.length || r.length ? new X(o, r) : ye;
|
|
14027
14047
|
}
|
|
14028
|
-
function
|
|
14048
|
+
function Lt(n, e) {
|
|
14029
14049
|
return n.from - e.from || n.to - e.to;
|
|
14030
14050
|
}
|
|
14031
|
-
function
|
|
14051
|
+
function zo(n) {
|
|
14032
14052
|
let e = n;
|
|
14033
14053
|
for (let t = 0; t < e.length - 1; t++) {
|
|
14034
14054
|
let i = e[t];
|
|
@@ -14047,7 +14067,7 @@ function Lo(n) {
|
|
|
14047
14067
|
return e;
|
|
14048
14068
|
}
|
|
14049
14069
|
function Kl(n, e, t) {
|
|
14050
|
-
for (; e < n.length &&
|
|
14070
|
+
for (; e < n.length && Lt(t, n[e]) > 0; )
|
|
14051
14071
|
e++;
|
|
14052
14072
|
n.splice(e, 0, t);
|
|
14053
14073
|
}
|
|
@@ -14065,7 +14085,7 @@ const Q3 = {
|
|
|
14065
14085
|
attributes: !0,
|
|
14066
14086
|
attributeOldValue: !0,
|
|
14067
14087
|
subtree: !0
|
|
14068
|
-
}, e4 =
|
|
14088
|
+
}, e4 = Ne && vt <= 11;
|
|
14069
14089
|
class t4 {
|
|
14070
14090
|
constructor() {
|
|
14071
14091
|
this.anchorNode = null, this.anchorOffset = 0, this.focusNode = null, this.focusOffset = 0;
|
|
@@ -14085,7 +14105,7 @@ class n4 {
|
|
|
14085
14105
|
this.view = e, this.handleDOMChange = t, this.queue = [], this.flushingSoon = -1, this.observer = null, this.currentSelection = new t4(), this.onCharData = null, this.suppressingSelectionUpdates = !1, this.lastChangedTextNode = null, this.observer = window.MutationObserver && new window.MutationObserver((i) => {
|
|
14086
14106
|
for (let r = 0; r < i.length; r++)
|
|
14087
14107
|
this.queue.push(i[r]);
|
|
14088
|
-
|
|
14108
|
+
Ne && vt <= 11 && i.some((r) => r.type == "childList" && r.removedNodes.length || r.type == "characterData" && r.oldValue.length > r.target.nodeValue.length) ? this.flushSoon() : this.flush();
|
|
14089
14109
|
}), e4 && (this.onCharData = (i) => {
|
|
14090
14110
|
this.queue.push({ target: i.target, type: "characterData", oldValue: i.prevValue }), this.flushSoon();
|
|
14091
14111
|
}), this.onSelectionChange = this.onSelectionChange.bind(this);
|
|
@@ -14126,7 +14146,7 @@ class n4 {
|
|
|
14126
14146
|
if (Bl(this.view)) {
|
|
14127
14147
|
if (this.suppressingSelectionUpdates)
|
|
14128
14148
|
return st(this.view);
|
|
14129
|
-
if (
|
|
14149
|
+
if (Ne && vt <= 11 && !this.view.state.selection.empty) {
|
|
14130
14150
|
let e = this.view.domSelectionRange();
|
|
14131
14151
|
if (e.focusNode && jt(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
|
|
14132
14152
|
return this.flushSoon();
|
|
@@ -14173,7 +14193,7 @@ class n4 {
|
|
|
14173
14193
|
let d = this.registerMutation(t[u], l);
|
|
14174
14194
|
d && (s = s < 0 ? d.from : Math.min(d.from, s), o = o < 0 ? d.to : Math.max(d.to, o), d.typeOver && (a = !0));
|
|
14175
14195
|
}
|
|
14176
|
-
if (
|
|
14196
|
+
if (ze && l.length) {
|
|
14177
14197
|
let u = l.filter((d) => d.nodeName == "BR");
|
|
14178
14198
|
if (u.length == 2) {
|
|
14179
14199
|
let [d, h] = u;
|
|
@@ -14193,7 +14213,7 @@ class n4 {
|
|
|
14193
14213
|
}
|
|
14194
14214
|
}
|
|
14195
14215
|
let c = null;
|
|
14196
|
-
s < 0 && r && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && dr(i) && (c = Oo(e)) && c.eq(
|
|
14216
|
+
s < 0 && r && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && dr(i) && (c = Oo(e)) && c.eq(L.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, st(e), this.currentSelection.set(i), e.scrollToSelection()) : (s > -1 || r) && (s > -1 && (e.docView.markDirty(s, o), i4(e)), this.handleDOMChange(s, o, a, l), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(i) || st(e), this.currentSelection.set(i));
|
|
14197
14217
|
}
|
|
14198
14218
|
registerMutation(e, t) {
|
|
14199
14219
|
if (t.indexOf(e.target) > -1)
|
|
@@ -14210,7 +14230,7 @@ class n4 {
|
|
|
14210
14230
|
if (i.contentDOM && i.contentDOM != i.dom && !i.contentDOM.contains(e.target))
|
|
14211
14231
|
return { from: i.posBefore, to: i.posAfter };
|
|
14212
14232
|
let r = e.previousSibling, s = e.nextSibling;
|
|
14213
|
-
if (
|
|
14233
|
+
if (Ne && vt <= 11 && e.addedNodes.length)
|
|
14214
14234
|
for (let u = 0; u < e.addedNodes.length; u++) {
|
|
14215
14235
|
let { previousSibling: d, nextSibling: h } = e.addedNodes[u];
|
|
14216
14236
|
(!d || Array.prototype.indexOf.call(e.addedNodes, d) < 0) && (r = d), (!h || Array.prototype.indexOf.call(e.addedNodes, h) < 0) && (s = h);
|
|
@@ -14232,7 +14252,7 @@ class n4 {
|
|
|
14232
14252
|
let Jl = /* @__PURE__ */ new WeakMap(), Gl = !1;
|
|
14233
14253
|
function i4(n) {
|
|
14234
14254
|
if (!Jl.has(n) && (Jl.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
|
|
14235
|
-
if (n.requiresGeckoHackNode =
|
|
14255
|
+
if (n.requiresGeckoHackNode = ze, Gl)
|
|
14236
14256
|
return;
|
|
14237
14257
|
console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), Gl = !0;
|
|
14238
14258
|
}
|
|
@@ -14327,7 +14347,7 @@ function c4(n, e, t, i, r) {
|
|
|
14327
14347
|
return;
|
|
14328
14348
|
}
|
|
14329
14349
|
if (!m)
|
|
14330
|
-
if (i && l instanceof
|
|
14350
|
+
if (i && l instanceof z && !l.empty && l.$head.sameParent(l.$anchor) && !n.composing && !(c.sel && c.sel.anchor != c.sel.head))
|
|
14331
14351
|
m = { start: l.from, endA: l.to, endB: l.to };
|
|
14332
14352
|
else {
|
|
14333
14353
|
if (c.sel) {
|
|
@@ -14339,7 +14359,7 @@ function c4(n, e, t, i, r) {
|
|
|
14339
14359
|
}
|
|
14340
14360
|
return;
|
|
14341
14361
|
}
|
|
14342
|
-
n.state.selection.from < n.state.selection.to && m.start == m.endB && n.state.selection instanceof
|
|
14362
|
+
n.state.selection.from < n.state.selection.to && m.start == m.endB && n.state.selection instanceof z && (m.start > n.state.selection.from && m.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? m.start = n.state.selection.from : m.endA < n.state.selection.to && m.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (m.endB += n.state.selection.to - m.endA, m.endA = n.state.selection.to)), Ne && vt <= 11 && m.endB == m.start + 1 && m.endA == m.start && m.start > c.from && c.doc.textBetween(m.start - c.from - 1, m.start - c.from + 1) == " " && (m.start--, m.endA--, m.endB--);
|
|
14343
14363
|
let v = c.doc.resolveNoCache(m.start - c.from), y = c.doc.resolveNoCache(m.endB - c.from), g = u.resolve(m.start), b = v.sameParent(y) && v.parent.inlineContent && g.end() >= m.endA;
|
|
14344
14364
|
if ((vn && n.input.lastIOSEnter > Date.now() - 225 && (!b || r.some((M) => M.nodeName == "DIV" || M.nodeName == "P")) || !b && v.pos < c.doc.content.size && (!v.sameParent(y) || !v.parent.inlineContent) && v.pos < y.pos && !/\S/.test(c.doc.textBetween(v.pos, y.pos, "", ""))) && n.someProp("handleKeyDown", (M) => M(n, At(13, "Enter")))) {
|
|
14345
14365
|
n.input.lastIOSEnter = 0;
|
|
@@ -14358,13 +14378,13 @@ function c4(n, e, t, i, r) {
|
|
|
14358
14378
|
let O = M || n.state.tr.replace(w, C, c.doc.slice(m.start - c.from, m.endB - c.from));
|
|
14359
14379
|
if (c.sel) {
|
|
14360
14380
|
let E = Yl(n, O.doc, c.sel);
|
|
14361
|
-
E && !(le && n.composing && E.empty && (m.start != m.endB || n.input.lastChromeDelete < Date.now() - 100) && (E.head == w || E.head == O.mapping.map(C) - 1) ||
|
|
14381
|
+
E && !(le && n.composing && E.empty && (m.start != m.endB || n.input.lastChromeDelete < Date.now() - 100) && (E.head == w || E.head == O.mapping.map(C) - 1) || Ne && E.empty && E.head == w) && O.setSelection(E);
|
|
14362
14382
|
}
|
|
14363
14383
|
return s && O.setMeta("composition", s), O.scrollIntoView();
|
|
14364
14384
|
}, T;
|
|
14365
14385
|
if (b)
|
|
14366
14386
|
if (v.pos == y.pos) {
|
|
14367
|
-
|
|
14387
|
+
Ne && vt <= 11 && v.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => st(n), 20));
|
|
14368
14388
|
let M = x(n.state.tr.delete(w, C)), O = u.resolve(m.start).marksAcross(u.resolve(m.endA));
|
|
14369
14389
|
O && M.ensureMarks(O), n.dispatch(M);
|
|
14370
14390
|
} else if (
|
|
@@ -14531,7 +14551,7 @@ class kh {
|
|
|
14531
14551
|
let h = u == "preserve" && o && this.dom.style.overflowAnchor == null && W6(this);
|
|
14532
14552
|
if (o) {
|
|
14533
14553
|
this.domObserver.stop();
|
|
14534
|
-
let f = d && (
|
|
14554
|
+
let f = d && (Ne || le) && !this.composing && !r.selection.empty && !e.selection.empty && f4(r.selection, e.selection);
|
|
14535
14555
|
if (d) {
|
|
14536
14556
|
let m = le ? this.trackWrites = this.domSelectionRange().focusNode : null;
|
|
14537
14557
|
this.composing && (this.input.compositionNode = W3(this)), (s || !this.docView.update(e.doc, c, l, this)) && (this.docView.updateOuterDeco(c), this.docView.destroy(), this.docView = Dl(e.doc, c, l, this.dom, this)), m && !this.trackWrites && (f = !0);
|
|
@@ -14607,7 +14627,7 @@ class kh {
|
|
|
14607
14627
|
Query whether the view has focus.
|
|
14608
14628
|
*/
|
|
14609
14629
|
hasFocus() {
|
|
14610
|
-
if (
|
|
14630
|
+
if (Ne) {
|
|
14611
14631
|
let e = this.root.activeElement;
|
|
14612
14632
|
if (e == this.dom)
|
|
14613
14633
|
return !0;
|
|
@@ -14983,7 +15003,7 @@ function xh(n) {
|
|
|
14983
15003
|
return !1;
|
|
14984
15004
|
};
|
|
14985
15005
|
}
|
|
14986
|
-
var x4 = Object.defineProperty,
|
|
15006
|
+
var x4 = Object.defineProperty, Lo = (n, e) => {
|
|
14987
15007
|
for (var t in e)
|
|
14988
15008
|
x4(n, t, { get: e[t], enumerable: !0 });
|
|
14989
15009
|
};
|
|
@@ -15080,7 +15100,7 @@ var mr = class {
|
|
|
15080
15100
|
return o;
|
|
15081
15101
|
}
|
|
15082
15102
|
}, Sh = {};
|
|
15083
|
-
|
|
15103
|
+
Lo(Sh, {
|
|
15084
15104
|
blur: () => S4,
|
|
15085
15105
|
clearContent: () => T4,
|
|
15086
15106
|
clearNodes: () => M4,
|
|
@@ -15092,9 +15112,9 @@ zo(Sh, {
|
|
|
15092
15112
|
deleteRange: () => I4,
|
|
15093
15113
|
deleteSelection: () => D4,
|
|
15094
15114
|
enter: () => $4,
|
|
15095
|
-
exitCode: () =>
|
|
15096
|
-
extendMarkRange: () =>
|
|
15097
|
-
first: () =>
|
|
15115
|
+
exitCode: () => R4,
|
|
15116
|
+
extendMarkRange: () => P4,
|
|
15117
|
+
first: () => z4,
|
|
15098
15118
|
focus: () => B4,
|
|
15099
15119
|
forEach: () => F4,
|
|
15100
15120
|
insertContent: () => V4,
|
|
@@ -15123,10 +15143,10 @@ zo(Sh, {
|
|
|
15123
15143
|
setContent: () => fv,
|
|
15124
15144
|
setMark: () => Dv,
|
|
15125
15145
|
setMeta: () => $v,
|
|
15126
|
-
setNode: () =>
|
|
15127
|
-
setNodeSelection: () =>
|
|
15128
|
-
setTextDirection: () =>
|
|
15129
|
-
setTextSelection: () =>
|
|
15146
|
+
setNode: () => Rv,
|
|
15147
|
+
setNodeSelection: () => Pv,
|
|
15148
|
+
setTextDirection: () => zv,
|
|
15149
|
+
setTextSelection: () => Lv,
|
|
15130
15150
|
sinkListItem: () => Bv,
|
|
15131
15151
|
splitBlock: () => Fv,
|
|
15132
15152
|
splitListItem: () => Vv,
|
|
@@ -15166,7 +15186,7 @@ var S4 = () => ({ editor: n, view: e }) => (requestAnimationFrame(() => {
|
|
|
15166
15186
|
const { state: r } = t, s = r.doc.slice(n.from, n.to);
|
|
15167
15187
|
i.deleteRange(n.from, n.to);
|
|
15168
15188
|
const o = i.mapping.map(e);
|
|
15169
|
-
return i.insert(o, s.content), i.setSelection(new
|
|
15189
|
+
return i.insert(o, s.content), i.setSelection(new z(i.doc.resolve(Math.max(o - 1, 0)))), !0;
|
|
15170
15190
|
}, O4 = () => ({ tr: n, dispatch: e }) => {
|
|
15171
15191
|
const { selection: t } = n, i = t.$anchor.node();
|
|
15172
15192
|
if (i.content.size > 0)
|
|
@@ -15204,7 +15224,7 @@ var A4 = (n) => ({ tr: e, state: t, dispatch: i }) => {
|
|
|
15204
15224
|
}, I4 = (n) => ({ tr: e, dispatch: t }) => {
|
|
15205
15225
|
const { from: i, to: r } = n;
|
|
15206
15226
|
return t && e.delete(i, r), !0;
|
|
15207
|
-
}, D4 = () => ({ state: n, dispatch: e }) => l6(n, e), $4 = () => ({ commands: n }) => n.keyboardShortcut("Enter"),
|
|
15227
|
+
}, D4 = () => ({ state: n, dispatch: e }) => l6(n, e), $4 = () => ({ commands: n }) => n.keyboardShortcut("Enter"), R4 = () => ({ state: n, dispatch: e }) => b6(n, e);
|
|
15208
15228
|
function Bo(n) {
|
|
15209
15229
|
return Object.prototype.toString.call(n) === "[object RegExp]";
|
|
15210
15230
|
}
|
|
@@ -15247,17 +15267,17 @@ function ot(n, e) {
|
|
|
15247
15267
|
}
|
|
15248
15268
|
return n;
|
|
15249
15269
|
}
|
|
15250
|
-
var
|
|
15270
|
+
var P4 = (n, e = {}) => ({ tr: t, state: i, dispatch: r }) => {
|
|
15251
15271
|
const s = ot(n, i.schema), { doc: o, selection: a } = t, { $from: l, from: c, to: u } = a;
|
|
15252
15272
|
if (r) {
|
|
15253
15273
|
const d = Mh(l, s, e);
|
|
15254
15274
|
if (d && d.from <= c && d.to >= u) {
|
|
15255
|
-
const h =
|
|
15275
|
+
const h = z.create(o, d.from, d.to);
|
|
15256
15276
|
t.setSelection(h);
|
|
15257
15277
|
}
|
|
15258
15278
|
}
|
|
15259
15279
|
return !0;
|
|
15260
|
-
},
|
|
15280
|
+
}, z4 = (n) => (e) => {
|
|
15261
15281
|
const t = typeof n == "function" ? n(e) : n;
|
|
15262
15282
|
for (let i = 0; i < t.length; i += 1)
|
|
15263
15283
|
if (t[i](e))
|
|
@@ -15265,7 +15285,7 @@ var R4 = (n, e = {}) => ({ tr: t, state: i, dispatch: r }) => {
|
|
|
15265
15285
|
return !1;
|
|
15266
15286
|
};
|
|
15267
15287
|
function _h(n) {
|
|
15268
|
-
return n instanceof
|
|
15288
|
+
return n instanceof z;
|
|
15269
15289
|
}
|
|
15270
15290
|
function $t(n = 0, e = 0, t = 0) {
|
|
15271
15291
|
return Math.min(Math.max(n, e), t);
|
|
@@ -15273,15 +15293,15 @@ function $t(n = 0, e = 0, t = 0) {
|
|
|
15273
15293
|
function Nh(n, e = null) {
|
|
15274
15294
|
if (!e)
|
|
15275
15295
|
return null;
|
|
15276
|
-
const t =
|
|
15296
|
+
const t = L.atStart(n), i = L.atEnd(n);
|
|
15277
15297
|
if (e === "start" || e === !0)
|
|
15278
15298
|
return t;
|
|
15279
15299
|
if (e === "end")
|
|
15280
15300
|
return i;
|
|
15281
15301
|
const r = t.from, s = i.to;
|
|
15282
|
-
return e === "all" ?
|
|
15302
|
+
return e === "all" ? z.create(n, $t(0, r, s), $t(n.content.size, r, s)) : z.create(n, $t(e, r, s), $t(e, r, s));
|
|
15283
15303
|
}
|
|
15284
|
-
function
|
|
15304
|
+
function L4() {
|
|
15285
15305
|
return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
|
|
15286
15306
|
}
|
|
15287
15307
|
function Fo() {
|
|
@@ -15294,7 +15314,7 @@ var B4 = (n = null, e = {}) => ({ editor: t, view: i, tr: r, dispatch: s }) => {
|
|
|
15294
15314
|
...e
|
|
15295
15315
|
};
|
|
15296
15316
|
const o = () => {
|
|
15297
|
-
(Fo() ||
|
|
15317
|
+
(Fo() || L4()) && i.dom.focus(), requestAnimationFrame(() => {
|
|
15298
15318
|
t.isDestroyed || (i.focus(), e != null && e.scrollIntoView && t.commands.scrollIntoView());
|
|
15299
15319
|
});
|
|
15300
15320
|
};
|
|
@@ -15380,7 +15400,7 @@ function H4(n, e, t) {
|
|
|
15380
15400
|
let o = 0;
|
|
15381
15401
|
s.forEach((a, l, c, u) => {
|
|
15382
15402
|
o === 0 && (o = u);
|
|
15383
|
-
}), n.setSelection(
|
|
15403
|
+
}), n.setSelection(L.near(n.doc.resolve(o), t));
|
|
15384
15404
|
}
|
|
15385
15405
|
var j4 = (n) => !("type" in n), W4 = (n, e, t) => ({ tr: i, dispatch: r, editor: s }) => {
|
|
15386
15406
|
var o;
|
|
@@ -15554,7 +15574,7 @@ var sv = (n, e) => ({ tr: t, state: i, dispatch: r }) => {
|
|
|
15554
15574
|
}), l;
|
|
15555
15575
|
}, ov = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), av = () => ({ tr: n, dispatch: e }) => {
|
|
15556
15576
|
if (e) {
|
|
15557
|
-
const t = new
|
|
15577
|
+
const t = new Pe(n.doc);
|
|
15558
15578
|
n.setSelection(t);
|
|
15559
15579
|
}
|
|
15560
15580
|
return !0;
|
|
@@ -15878,7 +15898,7 @@ function $h(n) {
|
|
|
15878
15898
|
"[tiptap warn]: Duplicate extension names found: [".concat(t.map((i) => "'".concat(i, "'")).join(", "), "]. This can lead to issues.")
|
|
15879
15899
|
), e;
|
|
15880
15900
|
}
|
|
15881
|
-
function
|
|
15901
|
+
function Rh(n, e, t) {
|
|
15882
15902
|
const { from: i, to: r } = e, { blockSeparator: s = "\n\n", textSerializers: o = {} } = t || {};
|
|
15883
15903
|
let a = "";
|
|
15884
15904
|
return n.nodesBetween(i, r, (l, c, u, d) => {
|
|
@@ -15901,9 +15921,9 @@ function Cv(n, e) {
|
|
|
15901
15921
|
from: 0,
|
|
15902
15922
|
to: n.content.size
|
|
15903
15923
|
};
|
|
15904
|
-
return
|
|
15924
|
+
return Rh(n, t, e);
|
|
15905
15925
|
}
|
|
15906
|
-
function
|
|
15926
|
+
function Ph(n) {
|
|
15907
15927
|
return Object.fromEntries(
|
|
15908
15928
|
Object.entries(n.nodes).filter(([, e]) => e.spec.toText).map(([e, t]) => [e, t.spec.toText])
|
|
15909
15929
|
);
|
|
@@ -16061,7 +16081,7 @@ function vr(n, {
|
|
|
16061
16081
|
function Ev(n) {
|
|
16062
16082
|
return n instanceof D;
|
|
16063
16083
|
}
|
|
16064
|
-
var
|
|
16084
|
+
var zh = class Lh {
|
|
16065
16085
|
constructor(e) {
|
|
16066
16086
|
this.position = e;
|
|
16067
16087
|
}
|
|
@@ -16069,7 +16089,7 @@ var Lh = class zh {
|
|
|
16069
16089
|
* Creates a MappablePosition from a JSON object.
|
|
16070
16090
|
*/
|
|
16071
16091
|
static fromJSON(e) {
|
|
16072
|
-
return new
|
|
16092
|
+
return new Lh(e.position);
|
|
16073
16093
|
}
|
|
16074
16094
|
/**
|
|
16075
16095
|
* Converts the MappablePosition to a JSON object.
|
|
@@ -16083,12 +16103,12 @@ var Lh = class zh {
|
|
|
16083
16103
|
function Ov(n, e) {
|
|
16084
16104
|
const t = e.mapping.mapResult(n.position);
|
|
16085
16105
|
return {
|
|
16086
|
-
position: new
|
|
16106
|
+
position: new zh(t.pos),
|
|
16087
16107
|
mapResult: t
|
|
16088
16108
|
};
|
|
16089
16109
|
}
|
|
16090
16110
|
function Av(n) {
|
|
16091
|
-
return new
|
|
16111
|
+
return new zh(n);
|
|
16092
16112
|
}
|
|
16093
16113
|
function Iv(n, e, t) {
|
|
16094
16114
|
var i;
|
|
@@ -16141,17 +16161,17 @@ var Dv = (n, e = {}) => ({ tr: t, state: i, dispatch: r }) => {
|
|
|
16141
16161
|
});
|
|
16142
16162
|
});
|
|
16143
16163
|
return Iv(i, t, l);
|
|
16144
|
-
}, $v = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0),
|
|
16164
|
+
}, $v = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), Rv = (n, e = {}) => ({ state: t, dispatch: i, chain: r }) => {
|
|
16145
16165
|
const s = de(n, t.schema);
|
|
16146
16166
|
let o;
|
|
16147
16167
|
return t.selection.$anchor.sameParent(t.selection.$head) && (o = t.selection.$anchor.parent.attrs), s.isTextblock ? r().command(({ commands: a }) => Sl(s, { ...o, ...e })(t) ? !0 : a.clearNodes()).command(({ state: a }) => Sl(s, { ...o, ...e })(a, i)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
|
|
16148
|
-
},
|
|
16168
|
+
}, Pv = (n) => ({ tr: e, dispatch: t }) => {
|
|
16149
16169
|
if (t) {
|
|
16150
16170
|
const { doc: i } = e, r = $t(n, 0, i.content.size), s = D.create(i, r);
|
|
16151
16171
|
e.setSelection(s);
|
|
16152
16172
|
}
|
|
16153
16173
|
return !0;
|
|
16154
|
-
},
|
|
16174
|
+
}, zv = (n, e) => ({ tr: t, state: i, dispatch: r }) => {
|
|
16155
16175
|
const { selection: s } = i;
|
|
16156
16176
|
let o, a;
|
|
16157
16177
|
return typeof e == "number" ? (o = e, a = e) : e && "from" in e && "to" in e ? (o = e.from, a = e.to) : (o = s.from, a = s.to), r && t.doc.nodesBetween(o, a, (l, c) => {
|
|
@@ -16160,9 +16180,9 @@ var Dv = (n, e = {}) => ({ tr: t, state: i, dispatch: r }) => {
|
|
|
16160
16180
|
dir: n
|
|
16161
16181
|
});
|
|
16162
16182
|
}), !0;
|
|
16163
|
-
},
|
|
16183
|
+
}, Lv = (n) => ({ tr: e, dispatch: t }) => {
|
|
16164
16184
|
if (t) {
|
|
16165
|
-
const { doc: i } = e, { from: r, to: s } = typeof n == "number" ? { from: n, to: n } : n, o =
|
|
16185
|
+
const { doc: i } = e, { from: r, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = z.atStart(i).from, a = z.atEnd(i).to, l = $t(r, o, a), c = $t(s, o, a), u = z.create(i, l, c);
|
|
16166
16186
|
e.setSelection(u);
|
|
16167
16187
|
}
|
|
16168
16188
|
return !0;
|
|
@@ -16196,7 +16216,7 @@ var Fv = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
16196
16216
|
attrs: u
|
|
16197
16217
|
}
|
|
16198
16218
|
] : void 0), i) {
|
|
16199
|
-
if (m && (s instanceof
|
|
16219
|
+
if (m && (s instanceof z && e.deleteSelection(), e.split(e.mapping.map(a.pos), 1, f), h && !d && !a.parentOffset && a.parent.type !== h)) {
|
|
16200
16220
|
const v = e.mapping.map(a.before()), y = e.doc.resolve(v);
|
|
16201
16221
|
a.node(-1).canReplaceWith(y.index(), y.index() + 1, h) && e.setNodeMarkup(e.mapping.map(a.before()), h);
|
|
16202
16222
|
}
|
|
@@ -16235,7 +16255,7 @@ var Fv = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: i, editor
|
|
|
16235
16255
|
if (M > -1)
|
|
16236
16256
|
return !1;
|
|
16237
16257
|
O.isTextblock && O.content.size === 0 && (M = E + 1);
|
|
16238
|
-
}), M > -1 && t.setSelection(
|
|
16258
|
+
}), M > -1 && t.setSelection(z.near(t.doc.resolve(M))), t.scrollIntoView();
|
|
16239
16259
|
}
|
|
16240
16260
|
return !0;
|
|
16241
16261
|
}
|
|
@@ -16980,7 +17000,7 @@ yr.resolve = $h;
|
|
|
16980
17000
|
yr.sort = Uo;
|
|
16981
17001
|
yr.flatten = Ho;
|
|
16982
17002
|
var u8 = {};
|
|
16983
|
-
|
|
17003
|
+
Lo(u8, {
|
|
16984
17004
|
ClipboardTextSerializer: () => Hh,
|
|
16985
17005
|
Commands: () => jh,
|
|
16986
17006
|
Delete: () => Wh,
|
|
@@ -17025,8 +17045,8 @@ var re = class Vh extends qo {
|
|
|
17025
17045
|
key: new ge("clipboardTextSerializer"),
|
|
17026
17046
|
props: {
|
|
17027
17047
|
clipboardTextSerializer: () => {
|
|
17028
|
-
const { editor: n } = this, { state: e, schema: t } = n, { doc: i, selection: r } = e, { ranges: s } = r, o = Math.min(...s.map((u) => u.$from.pos)), a = Math.max(...s.map((u) => u.$to.pos)), l =
|
|
17029
|
-
return
|
|
17048
|
+
const { editor: n } = this, { state: e, schema: t } = n, { doc: i, selection: r } = e, { ranges: s } = r, o = Math.min(...s.map((u) => u.$from.pos)), a = Math.max(...s.map((u) => u.$to.pos)), l = Ph(t);
|
|
17049
|
+
return Rh(i, { from: o, to: a }, {
|
|
17030
17050
|
...this.options.blockSeparator !== void 0 ? { blockSeparator: this.options.blockSeparator } : {},
|
|
17031
17051
|
textSerializers: l
|
|
17032
17052
|
});
|
|
@@ -17160,7 +17180,7 @@ var re = class Vh extends qo {
|
|
|
17160
17180
|
() => o.undoInputRule(),
|
|
17161
17181
|
// maybe convert first text block node to default node
|
|
17162
17182
|
() => o.command(({ tr: a }) => {
|
|
17163
|
-
const { selection: l, doc: c } = a, { empty: u, $anchor: d } = l, { pos: h, parent: f } = d, m = d.parent.isTextblock && h > 0 ? a.doc.resolve(h - 1) : d, v = m.parent.type.spec.isolating, y = d.pos - d.parentOffset, g = v && m.parent.childCount === 1 ? y === d.pos :
|
|
17183
|
+
const { selection: l, doc: c } = a, { empty: u, $anchor: d } = l, { pos: h, parent: f } = d, m = d.parent.isTextblock && h > 0 ? a.doc.resolve(h - 1) : d, v = m.parent.type.spec.isolating, y = d.pos - d.parentOffset, g = v && m.parent.childCount === 1 ? y === d.pos : L.atStart(c).from === h;
|
|
17164
17184
|
return !u || !f.type.isTextblock || f.textContent.length || !g || g && d.parent.type.name === "paragraph" ? !1 : o.clearNodes();
|
|
17165
17185
|
}),
|
|
17166
17186
|
() => o.deleteSelection(),
|
|
@@ -17215,7 +17235,7 @@ var re = class Vh extends qo {
|
|
|
17215
17235
|
const i = n.some((v) => v.docChanged) && !e.doc.eq(t.doc), r = n.some((v) => v.getMeta("preventClearDocument"));
|
|
17216
17236
|
if (!i || r)
|
|
17217
17237
|
return;
|
|
17218
|
-
const { empty: s, from: o, to: a } = e.selection, l =
|
|
17238
|
+
const { empty: s, from: o, to: a } = e.selection, l = L.atStart(e.doc).from, c = L.atEnd(e.doc).to;
|
|
17219
17239
|
if (s || !(o === l && a === c) || !vr(t.doc))
|
|
17220
17240
|
return;
|
|
17221
17241
|
const h = t.tr, f = pr({
|
|
@@ -17823,7 +17843,7 @@ var p8 = class extends Qv {
|
|
|
17823
17843
|
return Cv(this.state.doc, {
|
|
17824
17844
|
blockSeparator: e,
|
|
17825
17845
|
textSerializers: {
|
|
17826
|
-
...
|
|
17846
|
+
...Ph(this.schema),
|
|
17827
17847
|
...t
|
|
17828
17848
|
}
|
|
17829
17849
|
});
|
|
@@ -18138,7 +18158,7 @@ var g8 = (n) => "touches" in n, v8 = class {
|
|
|
18138
18158
|
};
|
|
18139
18159
|
}
|
|
18140
18160
|
}, y8 = {};
|
|
18141
|
-
|
|
18161
|
+
Lo(y8, {
|
|
18142
18162
|
createAtomBlockMarkdownSpec: () => b8,
|
|
18143
18163
|
createBlockMarkdownSpec: () => w8,
|
|
18144
18164
|
createInlineMarkdownSpec: () => x8,
|
|
@@ -18628,7 +18648,7 @@ class $8 {
|
|
|
18628
18648
|
this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
|
|
18629
18649
|
}
|
|
18630
18650
|
}
|
|
18631
|
-
class Z extends
|
|
18651
|
+
class Z extends L {
|
|
18632
18652
|
/**
|
|
18633
18653
|
Create a gap cursor.
|
|
18634
18654
|
*/
|
|
@@ -18637,7 +18657,7 @@ class Z extends z {
|
|
|
18637
18657
|
}
|
|
18638
18658
|
map(e, t) {
|
|
18639
18659
|
let i = e.resolve(t.map(this.head));
|
|
18640
|
-
return Z.valid(i) ? new Z(i) :
|
|
18660
|
+
return Z.valid(i) ? new Z(i) : L.near(i);
|
|
18641
18661
|
}
|
|
18642
18662
|
content() {
|
|
18643
18663
|
return _.empty;
|
|
@@ -18667,7 +18687,7 @@ class Z extends z {
|
|
|
18667
18687
|
*/
|
|
18668
18688
|
static valid(e) {
|
|
18669
18689
|
let t = e.parent;
|
|
18670
|
-
if (t.isTextblock || !
|
|
18690
|
+
if (t.isTextblock || !R8(e) || !P8(e))
|
|
18671
18691
|
return !1;
|
|
18672
18692
|
let i = t.type.spec.allowGapCursor;
|
|
18673
18693
|
if (i != null)
|
|
@@ -18716,7 +18736,7 @@ class Z extends z {
|
|
|
18716
18736
|
}
|
|
18717
18737
|
Z.prototype.visible = !1;
|
|
18718
18738
|
Z.findFrom = Z.findGapCursorFrom;
|
|
18719
|
-
|
|
18739
|
+
L.jsonID("gapcursor", Z);
|
|
18720
18740
|
class Go {
|
|
18721
18741
|
constructor(e) {
|
|
18722
18742
|
this.pos = e;
|
|
@@ -18726,13 +18746,13 @@ class Go {
|
|
|
18726
18746
|
}
|
|
18727
18747
|
resolve(e) {
|
|
18728
18748
|
let t = e.resolve(this.pos);
|
|
18729
|
-
return Z.valid(t) ? new Z(t) :
|
|
18749
|
+
return Z.valid(t) ? new Z(t) : L.near(t);
|
|
18730
18750
|
}
|
|
18731
18751
|
}
|
|
18732
18752
|
function ef(n) {
|
|
18733
18753
|
return n.isAtom || n.spec.isolating || n.spec.createGapCursor;
|
|
18734
18754
|
}
|
|
18735
|
-
function
|
|
18755
|
+
function R8(n) {
|
|
18736
18756
|
for (let e = n.depth; e >= 0; e--) {
|
|
18737
18757
|
let t = n.index(e), i = n.node(e);
|
|
18738
18758
|
if (t == 0) {
|
|
@@ -18749,7 +18769,7 @@ function P8(n) {
|
|
|
18749
18769
|
}
|
|
18750
18770
|
return !0;
|
|
18751
18771
|
}
|
|
18752
|
-
function
|
|
18772
|
+
function P8(n) {
|
|
18753
18773
|
for (let e = n.depth; e >= 0; e--) {
|
|
18754
18774
|
let t = n.indexAfter(e), i = n.node(e);
|
|
18755
18775
|
if (t == i.childCount) {
|
|
@@ -18766,7 +18786,7 @@ function R8(n) {
|
|
|
18766
18786
|
}
|
|
18767
18787
|
return !0;
|
|
18768
18788
|
}
|
|
18769
|
-
function
|
|
18789
|
+
function z8() {
|
|
18770
18790
|
return new ne({
|
|
18771
18791
|
props: {
|
|
18772
18792
|
decorations: V8,
|
|
@@ -18774,12 +18794,12 @@ function L8() {
|
|
|
18774
18794
|
return e.pos == t.pos && Z.valid(t) ? new Z(t) : null;
|
|
18775
18795
|
},
|
|
18776
18796
|
handleClick: B8,
|
|
18777
|
-
handleKeyDown:
|
|
18797
|
+
handleKeyDown: L8,
|
|
18778
18798
|
handleDOMEvents: { beforeinput: F8 }
|
|
18779
18799
|
}
|
|
18780
18800
|
});
|
|
18781
18801
|
}
|
|
18782
|
-
const
|
|
18802
|
+
const L8 = xh({
|
|
18783
18803
|
ArrowLeft: xi("horiz", -1),
|
|
18784
18804
|
ArrowRight: xi("horiz", 1),
|
|
18785
18805
|
ArrowUp: xi("vert", -1),
|
|
@@ -18789,7 +18809,7 @@ function xi(n, e) {
|
|
|
18789
18809
|
const t = n == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
|
|
18790
18810
|
return function(i, r, s) {
|
|
18791
18811
|
let o = i.selection, a = e > 0 ? o.$to : o.$from, l = o.empty;
|
|
18792
|
-
if (o instanceof
|
|
18812
|
+
if (o instanceof z) {
|
|
18793
18813
|
if (!s.endOfTextblock(t) || a.depth == 0)
|
|
18794
18814
|
return !1;
|
|
18795
18815
|
l = !1, a = i.doc.resolve(e > 0 ? a.after() : a.before());
|
|
@@ -18817,7 +18837,7 @@ function F8(n, e) {
|
|
|
18817
18837
|
for (let o = i.length - 1; o >= 0; o--)
|
|
18818
18838
|
r = S.from(i[o].createAndFill(null, r));
|
|
18819
18839
|
let s = n.state.tr.replace(t.pos, t.pos, new _(r, 0, 0));
|
|
18820
|
-
return s.setSelection(
|
|
18840
|
+
return s.setSelection(z.near(s.doc.resolve(t.pos + 1))), n.dispatch(s), !1;
|
|
18821
18841
|
}
|
|
18822
18842
|
function V8(n) {
|
|
18823
18843
|
if (!(n.selection instanceof Z))
|
|
@@ -19292,7 +19312,7 @@ re.create({
|
|
|
19292
19312
|
re.create({
|
|
19293
19313
|
name: "gapCursor",
|
|
19294
19314
|
addProseMirrorPlugins() {
|
|
19295
|
-
return [
|
|
19315
|
+
return [z8()];
|
|
19296
19316
|
},
|
|
19297
19317
|
extendNodeSchema(n) {
|
|
19298
19318
|
var e;
|
|
@@ -19617,24 +19637,23 @@ const mc = new B("chat-editor"), of = ({
|
|
|
19617
19637
|
onKeyDown: s
|
|
19618
19638
|
}) => {
|
|
19619
19639
|
const o = F(null), a = F(null);
|
|
19620
|
-
|
|
19621
|
-
R(() => {
|
|
19640
|
+
return P(() => {
|
|
19622
19641
|
if (!a.current)
|
|
19623
19642
|
return;
|
|
19624
|
-
const
|
|
19625
|
-
const
|
|
19643
|
+
const l = async (u) => {
|
|
19644
|
+
const d = await n.opts.uploader.onUpload(u, () => {
|
|
19626
19645
|
}, {
|
|
19627
19646
|
context: n.context,
|
|
19628
19647
|
params: n.params
|
|
19629
19648
|
});
|
|
19630
|
-
if (!
|
|
19649
|
+
if (!d)
|
|
19631
19650
|
return { name: "", url: "" };
|
|
19632
|
-
const
|
|
19651
|
+
const h = n.opts.uploader.getDownLoadUrl(d, {
|
|
19633
19652
|
context: n.context,
|
|
19634
19653
|
params: n.params
|
|
19635
19654
|
});
|
|
19636
|
-
return { name:
|
|
19637
|
-
},
|
|
19655
|
+
return { name: d.name, url: h };
|
|
19656
|
+
}, c = new p8({
|
|
19638
19657
|
element: a.current,
|
|
19639
19658
|
extensions: [
|
|
19640
19659
|
N8,
|
|
@@ -19642,12 +19661,12 @@ const mc = new B("chat-editor"), of = ({
|
|
|
19642
19661
|
addKeyboardShortcuts() {
|
|
19643
19662
|
return {
|
|
19644
19663
|
"Mod-Enter": () => {
|
|
19645
|
-
var
|
|
19646
|
-
return (
|
|
19664
|
+
var u, d;
|
|
19665
|
+
return (u = o.current) == null || u.commands.enter(), (d = o.current) == null || d.commands.scrollIntoView(), !0;
|
|
19647
19666
|
},
|
|
19648
19667
|
"Shift-Enter": () => {
|
|
19649
|
-
var
|
|
19650
|
-
return (
|
|
19668
|
+
var u, d;
|
|
19669
|
+
return (u = o.current) == null || u.commands.enter(), (d = o.current) == null || d.commands.scrollIntoView(), !0;
|
|
19651
19670
|
}
|
|
19652
19671
|
};
|
|
19653
19672
|
}
|
|
@@ -19664,36 +19683,36 @@ const mc = new B("chat-editor"), of = ({
|
|
|
19664
19683
|
draggable: !1
|
|
19665
19684
|
}),
|
|
19666
19685
|
iy.configure({
|
|
19667
|
-
onDrop: async (
|
|
19668
|
-
if (
|
|
19686
|
+
onDrop: async (u, d) => {
|
|
19687
|
+
if (d = d.filter((f) => f.type.startsWith("image/")), !d.length)
|
|
19669
19688
|
return;
|
|
19670
|
-
const
|
|
19671
|
-
|
|
19689
|
+
const h = await Promise.all(
|
|
19690
|
+
d.map((f) => l(f))
|
|
19672
19691
|
);
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
|
|
19692
|
+
u.isDestroyed || u.chain().deleteSelection().insertContentAt(
|
|
19693
|
+
u.state.selection.from,
|
|
19694
|
+
h.map((f) => ({
|
|
19676
19695
|
type: "image",
|
|
19677
19696
|
attrs: {
|
|
19678
|
-
src:
|
|
19679
|
-
alt:
|
|
19697
|
+
src: f.url,
|
|
19698
|
+
alt: f.name
|
|
19680
19699
|
}
|
|
19681
19700
|
}))
|
|
19682
19701
|
).focus().scrollIntoView().run();
|
|
19683
19702
|
},
|
|
19684
|
-
onPaste: async (
|
|
19685
|
-
if (
|
|
19703
|
+
onPaste: async (u, d) => {
|
|
19704
|
+
if (d = d.filter((f) => f.type.startsWith("image/")), !d.length)
|
|
19686
19705
|
return;
|
|
19687
|
-
const
|
|
19688
|
-
|
|
19706
|
+
const h = await Promise.all(
|
|
19707
|
+
d.map((f) => l(f))
|
|
19689
19708
|
);
|
|
19690
|
-
|
|
19691
|
-
|
|
19692
|
-
|
|
19709
|
+
u.isDestroyed || u.chain().deleteSelection().insertContentAt(
|
|
19710
|
+
u.state.selection.from,
|
|
19711
|
+
h.map((f) => ({
|
|
19693
19712
|
type: "image",
|
|
19694
19713
|
attrs: {
|
|
19695
|
-
src:
|
|
19696
|
-
alt:
|
|
19714
|
+
src: f.url,
|
|
19715
|
+
alt: f.name
|
|
19697
19716
|
}
|
|
19698
19717
|
}))
|
|
19699
19718
|
).focus().scrollIntoView().run();
|
|
@@ -19702,34 +19721,21 @@ const mc = new B("chat-editor"), of = ({
|
|
|
19702
19721
|
],
|
|
19703
19722
|
content: e || "",
|
|
19704
19723
|
editorProps: {
|
|
19705
|
-
handleKeyDown: (
|
|
19724
|
+
handleKeyDown: (u, d) => s(d)
|
|
19706
19725
|
},
|
|
19707
19726
|
onUpdate: () => {
|
|
19708
|
-
r(
|
|
19727
|
+
r(c.getHTML());
|
|
19709
19728
|
},
|
|
19710
19729
|
onCreate: () => {
|
|
19711
|
-
i(
|
|
19730
|
+
i(c);
|
|
19712
19731
|
}
|
|
19713
19732
|
});
|
|
19714
|
-
return o.current =
|
|
19733
|
+
return o.current = c, () => {
|
|
19715
19734
|
o.current && (o.current.destroy(), o.current = null);
|
|
19716
19735
|
};
|
|
19717
|
-
}, []);
|
|
19718
|
-
const c = () => {
|
|
19719
|
-
l = !0;
|
|
19720
|
-
}, u = () => {
|
|
19721
|
-
l = !1;
|
|
19722
|
-
};
|
|
19723
|
-
return /* @__PURE__ */ p("div", { className: "".concat(mc.b(), " ").concat(t ? mc.m("disabled") : ""), children: /* @__PURE__ */ p(
|
|
19724
|
-
"div",
|
|
19725
|
-
{
|
|
19726
|
-
ref: a,
|
|
19727
|
-
onCompositionStart: c,
|
|
19728
|
-
onCompositionEnd: u
|
|
19729
|
-
}
|
|
19730
|
-
) });
|
|
19736
|
+
}, []), /* @__PURE__ */ p("div", { className: "".concat(mc.b(), " ").concat(t ? mc.m("disabled") : ""), children: /* @__PURE__ */ p("div", { ref: a }) });
|
|
19731
19737
|
}, ie = new B("user-message-question"), ry = (n) => {
|
|
19732
|
-
const e =
|
|
19738
|
+
const e = Ie(), t = $(null), i = $(135), r = $(!0), s = $(!1), o = F(null), a = Ee(() => an.parseMixedContent(n.message.content), [n.message.content]), l = $({
|
|
19733
19739
|
resources: [],
|
|
19734
19740
|
remainingText: "",
|
|
19735
19741
|
hasResources: !1
|
|
@@ -19752,15 +19758,16 @@ const mc = new B("chat-editor"), of = ({
|
|
|
19752
19758
|
syntax: {
|
|
19753
19759
|
table: {
|
|
19754
19760
|
enableChart: !1,
|
|
19761
|
+
// @ts-ignore
|
|
19755
19762
|
externals: ["echarts"]
|
|
19756
19763
|
}
|
|
19757
19764
|
}
|
|
19758
19765
|
}
|
|
19759
19766
|
}));
|
|
19760
19767
|
};
|
|
19761
|
-
|
|
19768
|
+
P(() => {
|
|
19762
19769
|
h();
|
|
19763
|
-
}, [l.value.remainingText, c]),
|
|
19770
|
+
}, [l.value.remainingText, c]), P(() => {
|
|
19764
19771
|
if (!o.current || !window.ResizeObserver)
|
|
19765
19772
|
return;
|
|
19766
19773
|
const b = new ResizeObserver(() => {
|
|
@@ -19780,8 +19787,8 @@ const mc = new B("chat-editor"), of = ({
|
|
|
19780
19787
|
b.stopPropagation(), n.controller.reEditCancel(n.message);
|
|
19781
19788
|
}, y = (b) => {
|
|
19782
19789
|
n.controller.reEditContentChanged.value && (b.stopPropagation(), n.controller.reEditSubmit(n.message));
|
|
19783
|
-
}, g = (b
|
|
19784
|
-
b.code === "Enter" &&
|
|
19790
|
+
}, g = (b) => {
|
|
19791
|
+
b.code === "Enter" && b.key === "Enter" && n.controller.reEditContentChanged.value && b.shiftKey === !1 && setTimeout(() => {
|
|
19785
19792
|
n.controller.reEditSubmit(n.message);
|
|
19786
19793
|
}, 0);
|
|
19787
19794
|
};
|
|
@@ -19815,8 +19822,8 @@ const mc = new B("chat-editor"), of = ({
|
|
|
19815
19822
|
onChange: (b) => {
|
|
19816
19823
|
m(b);
|
|
19817
19824
|
},
|
|
19818
|
-
onKeyDown: (b
|
|
19819
|
-
g(b
|
|
19825
|
+
onKeyDown: (b) => {
|
|
19826
|
+
g(b);
|
|
19820
19827
|
}
|
|
19821
19828
|
}
|
|
19822
19829
|
),
|
|
@@ -19907,7 +19914,7 @@ const mc = new B("chat-editor"), of = ({
|
|
|
19907
19914
|
] });
|
|
19908
19915
|
};
|
|
19909
19916
|
const Mt = new B("error-message"), sy = (n) => {
|
|
19910
|
-
const { message: e, size: t } = n, [i, r] = j(!0), s = $(
|
|
19917
|
+
const { message: e, size: t } = n, [i, r] = j(!0), s = $(Ie()), o = $(null), a = $({ resources: [], remainingText: "", hasResources: !1 }), l = (f) => {
|
|
19911
19918
|
const { resources: m, remainingText: v, hasResources: y, error: g } = an.parseMixedContent(f);
|
|
19912
19919
|
a.value = {
|
|
19913
19920
|
resources: m,
|
|
@@ -19960,7 +19967,7 @@ const Mt = new B("error-message"), sy = (n) => {
|
|
|
19960
19967
|
return !1;
|
|
19961
19968
|
}
|
|
19962
19969
|
};
|
|
19963
|
-
|
|
19970
|
+
P(() => {
|
|
19964
19971
|
if (t >= 0 && o.value) {
|
|
19965
19972
|
if (e.content.indexOf("<think>") !== -1) {
|
|
19966
19973
|
const { isThoughtCompleted: f, thoughtContent: m, answerContent: v } = u(e.content);
|
|
@@ -19969,7 +19976,7 @@ const Mt = new B("error-message"), sy = (n) => {
|
|
|
19969
19976
|
l(e.content);
|
|
19970
19977
|
o.value.setMarkdown(a.value.remainingText || "");
|
|
19971
19978
|
}
|
|
19972
|
-
}, [e, t]),
|
|
19979
|
+
}, [e, t]), P(() => {
|
|
19973
19980
|
let f = "";
|
|
19974
19981
|
if (e.content.indexOf("<think>") !== -1) {
|
|
19975
19982
|
const { isThoughtCompleted: m, thoughtContent: v, answerContent: y } = u(e.content);
|
|
@@ -20007,7 +20014,7 @@ const Mt = new B("error-message"), sy = (n) => {
|
|
|
20007
20014
|
}
|
|
20008
20015
|
});
|
|
20009
20016
|
}, []);
|
|
20010
|
-
const h =
|
|
20017
|
+
const h = Ee(() => e.errorText || k.t.value("unknownError"), [e.errorText]);
|
|
20011
20018
|
return /* @__PURE__ */ p("div", { className: Mt.b(), children: [
|
|
20012
20019
|
/* @__PURE__ */ p("div", { className: Mt.b("header"), children: [
|
|
20013
20020
|
/* @__PURE__ */ p("div", { className: Mt.be("header", "caption"), children: "AI " }),
|
|
@@ -20377,7 +20384,7 @@ const _e = new B("chat-toolbar-item"), cy = (n) => {
|
|
|
20377
20384
|
}, m = (b, w) => {
|
|
20378
20385
|
d(w) || (l(!1), o(b, w));
|
|
20379
20386
|
};
|
|
20380
|
-
return
|
|
20387
|
+
return P(() => {
|
|
20381
20388
|
const b = (w) => {
|
|
20382
20389
|
c.current && c.current.contains(w.target) || l(!1);
|
|
20383
20390
|
};
|
|
@@ -20537,7 +20544,7 @@ const uy = new B("chat-toolbar"), Xs = (n) => {
|
|
|
20537
20544
|
v
|
|
20538
20545
|
);
|
|
20539
20546
|
}
|
|
20540
|
-
}, h =
|
|
20547
|
+
}, h = Ee(() => r === "content" ? (i == null ? void 0 : i.role) === "ASSISTANT" ? (i == null ? void 0 : i.state) === 20 && (i == null ? void 0 : i.completed) !== !0 || e.isLoading.value : (i == null ? void 0 : i.role) === "USER" ? e.isLoading.value : !1 : !1, [i == null ? void 0 : i.state, i == null ? void 0 : i.completed, i == null ? void 0 : i.role, e.isLoading.value]);
|
|
20541
20548
|
return /* @__PURE__ */ p("div", { className: "".concat(uy.b(), " ").concat(s || ""), children: a.map((f, m) => /* @__PURE__ */ p(
|
|
20542
20549
|
cy,
|
|
20543
20550
|
{
|
|
@@ -20571,12 +20578,12 @@ const hy = (n) => {
|
|
|
20571
20578
|
behavior: "smooth"
|
|
20572
20579
|
}), (l = n.onClick) == null || l.call(n));
|
|
20573
20580
|
}, a = dy(s, 300);
|
|
20574
|
-
return
|
|
20581
|
+
return Ee(() => {
|
|
20575
20582
|
t.value = {
|
|
20576
20583
|
right: "".concat(n.right, "px"),
|
|
20577
20584
|
bottom: "".concat(n.bottom, "px")
|
|
20578
20585
|
};
|
|
20579
|
-
}, [n.right, n.bottom]),
|
|
20586
|
+
}, [n.right, n.bottom]), P(() => {
|
|
20580
20587
|
var l;
|
|
20581
20588
|
if (n.target) {
|
|
20582
20589
|
const c = (l = document.querySelector(n.target)) != null ? l : void 0;
|
|
@@ -20593,10 +20600,10 @@ const hy = (n) => {
|
|
|
20593
20600
|
);
|
|
20594
20601
|
};
|
|
20595
20602
|
const bc = new B("chat-messages"), wc = (n) => {
|
|
20596
|
-
const e = F(null), t = 5, [i, r] = j(t), [s, o] = j(!1), [a, l] = j(!0), c = F(!1), u = n.controller.messages, d = F(u.value.length), h =
|
|
20603
|
+
const e = F(null), t = 5, [i, r] = j(t), [s, o] = j(!1), [a, l] = j(!0), c = F(!1), u = n.controller.messages, d = F(u.value.length), h = Ee(() => {
|
|
20597
20604
|
const g = Math.max(0, u.value.length - i);
|
|
20598
20605
|
return u.value.slice(g);
|
|
20599
|
-
}, [u.value, i]), f =
|
|
20606
|
+
}, [u.value, i]), f = Ee(() => i < u.value.length, [u.value, i]), m = () => {
|
|
20600
20607
|
const g = e.current;
|
|
20601
20608
|
g && (c.current = !0, g.scrollTo({
|
|
20602
20609
|
top: g.scrollHeight,
|
|
@@ -20605,7 +20612,7 @@ const bc = new B("chat-messages"), wc = (n) => {
|
|
|
20605
20612
|
c.current = !1;
|
|
20606
20613
|
}, 500));
|
|
20607
20614
|
};
|
|
20608
|
-
|
|
20615
|
+
P(() => {
|
|
20609
20616
|
const g = u.value.length, b = d.current;
|
|
20610
20617
|
g !== b && l(!0), a && m(), d.current = g;
|
|
20611
20618
|
}, [u.value]);
|
|
@@ -21104,7 +21111,7 @@ class Cc {
|
|
|
21104
21111
|
async afterFecthHistory() {
|
|
21105
21112
|
if (this.opts.appendCurContent && (this.addMessage({
|
|
21106
21113
|
state: 30,
|
|
21107
|
-
messageid:
|
|
21114
|
+
messageid: Ie(),
|
|
21108
21115
|
role: "USER",
|
|
21109
21116
|
type: "DEFAULT",
|
|
21110
21117
|
content: this.opts.appendCurContent,
|
|
@@ -21123,7 +21130,7 @@ class Cc {
|
|
|
21123
21130
|
if (i) {
|
|
21124
21131
|
const r = i + t.content, s = {
|
|
21125
21132
|
...t._origin,
|
|
21126
|
-
messageid:
|
|
21133
|
+
messageid: Ie(),
|
|
21127
21134
|
content: r
|
|
21128
21135
|
};
|
|
21129
21136
|
this.messages.value[e] = new Nt(s), this.messages.value = [...this.messages.value];
|
|
@@ -21360,7 +21367,7 @@ class Cc {
|
|
|
21360
21367
|
let t = this.stringlyMaterialResource(!0);
|
|
21361
21368
|
t ? t += "\n".concat(e) : t = e, this.addMessage({
|
|
21362
21369
|
state: 30,
|
|
21363
|
-
messageid:
|
|
21370
|
+
messageid: Ie(),
|
|
21364
21371
|
role: "USER",
|
|
21365
21372
|
type: "DEFAULT",
|
|
21366
21373
|
content: t,
|
|
@@ -21456,7 +21463,7 @@ class Cc {
|
|
|
21456
21463
|
this.messages.value.length - i
|
|
21457
21464
|
), this.addMessage({
|
|
21458
21465
|
...s._origin,
|
|
21459
|
-
messageid:
|
|
21466
|
+
messageid: Ie()
|
|
21460
21467
|
}), await this.opts.question(
|
|
21461
21468
|
this,
|
|
21462
21469
|
this.context,
|
|
@@ -21476,7 +21483,7 @@ class Cc {
|
|
|
21476
21483
|
const o = this.messages.value.pop();
|
|
21477
21484
|
o && r.push(o), s = this.messages.value[this.messages.value.length - 1], s && (r.push(s), this.messages.value.pop(), this.addMessage({
|
|
21478
21485
|
...s._origin,
|
|
21479
|
-
messageid:
|
|
21486
|
+
messageid: Ie()
|
|
21480
21487
|
})), this.messages.value = [...this.messages.value], await this.opts.question(
|
|
21481
21488
|
this,
|
|
21482
21489
|
this.context,
|
|
@@ -21498,7 +21505,7 @@ class Cc {
|
|
|
21498
21505
|
this.messages.value.length - i
|
|
21499
21506
|
), s && this.addMessage({
|
|
21500
21507
|
...s._origin,
|
|
21501
|
-
messageid:
|
|
21508
|
+
messageid: Ie()
|
|
21502
21509
|
}), await this.opts.question(
|
|
21503
21510
|
this,
|
|
21504
21511
|
this.context,
|
|
@@ -21713,7 +21720,7 @@ class Cc {
|
|
|
21713
21720
|
if (!a)
|
|
21714
21721
|
throw new Error(k.t.value("actionIdCannotEmpty"));
|
|
21715
21722
|
this.addMessage({
|
|
21716
|
-
messageid:
|
|
21723
|
+
messageid: Ie(),
|
|
21717
21724
|
state: 30,
|
|
21718
21725
|
type: "DEFAULT",
|
|
21719
21726
|
role: "USER",
|
|
@@ -21752,7 +21759,7 @@ class Cc {
|
|
|
21752
21759
|
c
|
|
21753
21760
|
), h = (o = d == null ? void 0 : d.data) == null ? void 0 : o[0];
|
|
21754
21761
|
h && h.content && this.addMessage({
|
|
21755
|
-
messageid:
|
|
21762
|
+
messageid: Ie(),
|
|
21756
21763
|
state: 30,
|
|
21757
21764
|
type: h.type || "DEFAULT",
|
|
21758
21765
|
role: h.role || "ASSISTANT",
|
|
@@ -21816,7 +21823,7 @@ class Cc {
|
|
|
21816
21823
|
u
|
|
21817
21824
|
), f = (a = h == null ? void 0 : h.data) == null ? void 0 : a[0];
|
|
21818
21825
|
f && f.content && this.addMessage({
|
|
21819
|
-
messageid:
|
|
21826
|
+
messageid: Ie(),
|
|
21820
21827
|
state: 30,
|
|
21821
21828
|
type: f.type || "DEFAULT",
|
|
21822
21829
|
role: f.role || "ASSISTANT",
|
|
@@ -22041,7 +22048,7 @@ class Cc {
|
|
|
22041
22048
|
c
|
|
22042
22049
|
), f = (m = h == null ? void 0 : h.data) == null ? void 0 : m[0];
|
|
22043
22050
|
f && f.content && this.addMessage({
|
|
22044
|
-
messageid:
|
|
22051
|
+
messageid: Ie(),
|
|
22045
22052
|
state: 30,
|
|
22046
22053
|
type: f.type || "DEFAULT",
|
|
22047
22054
|
role: f.role || "ASSISTANT",
|
|
@@ -23054,7 +23061,7 @@ const Cy = new B("chat-input-material"), ky = (n) => {
|
|
|
23054
23061
|
t.id
|
|
23055
23062
|
)) });
|
|
23056
23063
|
};
|
|
23057
|
-
const
|
|
23064
|
+
const Oe = new B("chat-agent-setting"), xy = (n) => {
|
|
23058
23065
|
const { controller: e } = n, t = [
|
|
23059
23066
|
{ label: k.t.value("disabled"), value: 0 },
|
|
23060
23067
|
{ label: k.t.value("enable"), value: 1 },
|
|
@@ -23070,7 +23077,7 @@ const Ae = new B("chat-agent-setting"), xy = (n) => {
|
|
|
23070
23077
|
chunkthreshold: !1,
|
|
23071
23078
|
chunkpageindex: !1
|
|
23072
23079
|
});
|
|
23073
|
-
|
|
23080
|
+
P(() => {
|
|
23074
23081
|
const f = e.reCallConfig.value;
|
|
23075
23082
|
r.value = {
|
|
23076
23083
|
chunkrerank: f.chunkrerank !== 2,
|
|
@@ -23080,7 +23087,7 @@ const Ae = new B("chat-agent-setting"), xy = (n) => {
|
|
|
23080
23087
|
};
|
|
23081
23088
|
}, [e.activeAIAgentID]);
|
|
23082
23089
|
const s = F(null), o = F(null), [a, l] = j(!1);
|
|
23083
|
-
|
|
23090
|
+
P(() => {
|
|
23084
23091
|
const f = (m) => {
|
|
23085
23092
|
var v, y;
|
|
23086
23093
|
m.target && ((v = o.current) != null && v.contains(m.target)) || ((y = s.current) != null && y.contains(m.target) ? l((g) => !g) : l(!1));
|
|
@@ -23109,7 +23116,7 @@ const Ae = new B("chat-agent-setting"), xy = (n) => {
|
|
|
23109
23116
|
top: "calc(100% + 4px)"
|
|
23110
23117
|
},
|
|
23111
23118
|
options: t,
|
|
23112
|
-
className:
|
|
23119
|
+
className: Oe.e("select"),
|
|
23113
23120
|
value: e.reCallConfig.value[f],
|
|
23114
23121
|
onChange: (m) => c(f, m)
|
|
23115
23122
|
}
|
|
@@ -23119,7 +23126,7 @@ const Ae = new B("chat-agent-setting"), xy = (n) => {
|
|
|
23119
23126
|
l2,
|
|
23120
23127
|
{
|
|
23121
23128
|
showText: !0,
|
|
23122
|
-
className:
|
|
23129
|
+
className: Oe.e("switch"),
|
|
23123
23130
|
value: e.reCallConfig.value[f],
|
|
23124
23131
|
onChange: (m) => c(f, m)
|
|
23125
23132
|
}
|
|
@@ -23149,30 +23156,30 @@ const Ae = new B("chat-agent-setting"), xy = (n) => {
|
|
|
23149
23156
|
}
|
|
23150
23157
|
);
|
|
23151
23158
|
}
|
|
23152
|
-
}, h = (f) => /* @__PURE__ */ p("li", { className: "".concat(
|
|
23153
|
-
/* @__PURE__ */ p("div", { className:
|
|
23154
|
-
/* @__PURE__ */ p("div", { className:
|
|
23159
|
+
}, h = (f) => /* @__PURE__ */ p("li", { className: "".concat(Oe.em("dropdown", "item")), children: [
|
|
23160
|
+
/* @__PURE__ */ p("div", { className: Oe.em("dropdown", "label"), children: [
|
|
23161
|
+
/* @__PURE__ */ p("div", { className: Oe.em("dropdown", "label-left"), children: f.label }),
|
|
23155
23162
|
/* @__PURE__ */ p(
|
|
23156
23163
|
"div",
|
|
23157
23164
|
{
|
|
23158
|
-
className:
|
|
23165
|
+
className: Oe.em("dropdown", "label-right"),
|
|
23159
23166
|
onClick: () => u(f.value),
|
|
23160
23167
|
children: r.value[f.value] ? k.t.value("customize") : k.t.value("default")
|
|
23161
23168
|
}
|
|
23162
23169
|
)
|
|
23163
23170
|
] }),
|
|
23164
|
-
r.value[f.value] ? /* @__PURE__ */ p("div", { className:
|
|
23171
|
+
r.value[f.value] ? /* @__PURE__ */ p("div", { className: Oe.em("dropdown", "config"), children: d(f.value) }) : void 0
|
|
23165
23172
|
] });
|
|
23166
|
-
return /* @__PURE__ */ p("div", { className: "".concat(
|
|
23167
|
-
/* @__PURE__ */ p("div", { className:
|
|
23173
|
+
return /* @__PURE__ */ p("div", { className: "".concat(Oe.b(), " ").concat(n.className ? n.className : ""), children: [
|
|
23174
|
+
/* @__PURE__ */ p("div", { className: Oe.e("button"), ref: s, children: /* @__PURE__ */ p(
|
|
23168
23175
|
"span",
|
|
23169
23176
|
{
|
|
23170
23177
|
title: k.t.value("recallSettings"),
|
|
23171
|
-
className: "".concat(
|
|
23178
|
+
className: "".concat(Oe.em("button", "icon"), " ").concat(Oe.em("button", "prefix")),
|
|
23172
23179
|
children: Sg()
|
|
23173
23180
|
}
|
|
23174
23181
|
) }),
|
|
23175
|
-
a ? /* @__PURE__ */ p("div", { className:
|
|
23182
|
+
a ? /* @__PURE__ */ p("div", { className: Oe.e("dropdown"), ref: o, children: /* @__PURE__ */ p("ul", { className: Oe.em("dropdown", "list"), children: i.map((f) => h(f)) }) }) : null
|
|
23176
23183
|
] });
|
|
23177
23184
|
};
|
|
23178
23185
|
const G = new B("chat-input"), xc = window.SpeechRecognition || window.webkitSpeechRecognition, Sc = (n) => {
|
|
@@ -23209,8 +23216,8 @@ const G = new B("chat-input"), xc = window.SpeechRecognition || window.webkitSpe
|
|
|
23209
23216
|
} catch (w) {
|
|
23210
23217
|
console.error(w);
|
|
23211
23218
|
}
|
|
23212
|
-
}, [i]), d = (w
|
|
23213
|
-
if (w.code === "Enter" &&
|
|
23219
|
+
}, [i]), d = (w) => {
|
|
23220
|
+
if (w.code === "Enter" && w.key === "Enter" && w.shiftKey === !1)
|
|
23214
23221
|
return c(), !0;
|
|
23215
23222
|
}, h = async (w) => {
|
|
23216
23223
|
await kc.getMaterialHelper(
|
|
@@ -23381,7 +23388,7 @@ const G = new B("chat-input"), xc = window.SpeechRecognition || window.webkitSpe
|
|
|
23381
23388
|
] })
|
|
23382
23389
|
] });
|
|
23383
23390
|
};
|
|
23384
|
-
const
|
|
23391
|
+
const Ae = new B("chat-topic-item"), Sy = (n) => {
|
|
23385
23392
|
const { hasMoreThanOne: e, controller: t, topic: i, onClick: r, onAction: s } = n, o = F(null), a = be(() => {
|
|
23386
23393
|
var b;
|
|
23387
23394
|
return ((b = t.activedTopic.value) == null ? void 0 : b.id) === i.id;
|
|
@@ -23424,13 +23431,13 @@ const Ie = new B("chat-topic-item"), Sy = (n) => {
|
|
|
23424
23431
|
return /* @__PURE__ */ p(
|
|
23425
23432
|
"div",
|
|
23426
23433
|
{
|
|
23427
|
-
className: "".concat(
|
|
23434
|
+
className: "".concat(Ae.b(), " ").concat(Ae.is("active", a.value), " ").concat(Ae.is(
|
|
23428
23435
|
"edit",
|
|
23429
23436
|
d.value
|
|
23430
23437
|
)),
|
|
23431
23438
|
onClick: r.bind(void 0),
|
|
23432
23439
|
children: [
|
|
23433
|
-
/* @__PURE__ */ p("div", { className:
|
|
23440
|
+
/* @__PURE__ */ p("div", { className: Ae.e("caption"), title: i.caption, children: d.value ? /* @__PURE__ */ p(
|
|
23434
23441
|
"input",
|
|
23435
23442
|
{
|
|
23436
23443
|
ref: o,
|
|
@@ -23439,20 +23446,20 @@ const Ie = new B("chat-topic-item"), Sy = (n) => {
|
|
|
23439
23446
|
onKeyDown: y,
|
|
23440
23447
|
onClick: (g) => g.stopPropagation(),
|
|
23441
23448
|
onChange: (g) => m(g),
|
|
23442
|
-
className:
|
|
23449
|
+
className: Ae.em("caption", "editor")
|
|
23443
23450
|
}
|
|
23444
|
-
) : /* @__PURE__ */ p("div", { className:
|
|
23445
|
-
/* @__PURE__ */ p("span", { className:
|
|
23446
|
-
i.isTop ? /* @__PURE__ */ p("span", { className:
|
|
23451
|
+
) : /* @__PURE__ */ p("div", { className: Ae.em("caption", "readonly"), children: [
|
|
23452
|
+
/* @__PURE__ */ p("span", { className: Ae.em("caption", "text"), children: i.caption }),
|
|
23453
|
+
i.isTop ? /* @__PURE__ */ p("span", { className: Ae.em("caption", "icon"), children: /* @__PURE__ */ p(Fr, {}) }) : null
|
|
23447
23454
|
] }) }),
|
|
23448
|
-
!d.value && /* @__PURE__ */ p("div", { className:
|
|
23455
|
+
!d.value && /* @__PURE__ */ p("div", { className: Ae.e("icon"), children: [
|
|
23449
23456
|
/* @__PURE__ */ p(
|
|
23450
23457
|
"span",
|
|
23451
23458
|
{
|
|
23452
23459
|
title: k.t.value("jumpMainView"),
|
|
23453
|
-
className:
|
|
23460
|
+
className: Ae.em("icon", "item"),
|
|
23454
23461
|
onClick: h.bind(void 0),
|
|
23455
|
-
children: /* @__PURE__ */ p(hg, { className:
|
|
23462
|
+
children: /* @__PURE__ */ p(hg, { className: Ae.b("link-icon") })
|
|
23456
23463
|
}
|
|
23457
23464
|
),
|
|
23458
23465
|
/* @__PURE__ */ p(
|
|
@@ -23467,9 +23474,9 @@ const Ie = new B("chat-topic-item"), Sy = (n) => {
|
|
|
23467
23474
|
children: /* @__PURE__ */ p(
|
|
23468
23475
|
"span",
|
|
23469
23476
|
{
|
|
23470
|
-
className:
|
|
23477
|
+
className: Ae.em("icon", "item"),
|
|
23471
23478
|
title: k.t.value("more"),
|
|
23472
|
-
children: /* @__PURE__ */ p(dg, { className:
|
|
23479
|
+
children: /* @__PURE__ */ p(dg, { className: Ae.e("more-icon") })
|
|
23473
23480
|
}
|
|
23474
23481
|
)
|
|
23475
23482
|
}
|
|
@@ -23481,7 +23488,7 @@ const Ie = new B("chat-topic-item"), Sy = (n) => {
|
|
|
23481
23488
|
};
|
|
23482
23489
|
const xe = new B("chat-topics"), Ty = (n) => {
|
|
23483
23490
|
const e = F(null), t = $(void 0), i = $([]);
|
|
23484
|
-
|
|
23491
|
+
P(() => {
|
|
23485
23492
|
const d = [...n.controller.topics.value].sort((h, f) => h.isTop !== f.isTop ? f.isTop ? 1 : -1 : h.sequence - f.sequence);
|
|
23486
23493
|
i.value = d.filter(
|
|
23487
23494
|
(h) => {
|
|
@@ -23502,7 +23509,7 @@ const xe = new B("chat-topics"), Ty = (n) => {
|
|
|
23502
23509
|
}
|
|
23503
23510
|
);
|
|
23504
23511
|
};
|
|
23505
|
-
|
|
23512
|
+
P(() => {
|
|
23506
23513
|
const d = e.current;
|
|
23507
23514
|
if (!d)
|
|
23508
23515
|
return;
|
|
@@ -23680,14 +23687,14 @@ const en = new B("chat-minimize"), My = (n) => {
|
|
|
23680
23687
|
}, f = () => {
|
|
23681
23688
|
o.current || n.onClick();
|
|
23682
23689
|
};
|
|
23683
|
-
return
|
|
23690
|
+
return P(() => {
|
|
23684
23691
|
const m = localStorage.getItem(ee.MINIMIZE_STYLY_CHCHE);
|
|
23685
23692
|
if (m) {
|
|
23686
23693
|
const v = JSON.parse(m);
|
|
23687
23694
|
_s(v) && Object.assign(a, v);
|
|
23688
23695
|
}
|
|
23689
23696
|
d(), h();
|
|
23690
|
-
}, []),
|
|
23697
|
+
}, []), P(() => {
|
|
23691
23698
|
if (r < u.value.length) {
|
|
23692
23699
|
const m = setTimeout(() => {
|
|
23693
23700
|
i((v) => v + u.value[r]), s((v) => v + 1);
|